I have set up a cron job to backup my Kontact emails etc. The bash script that I have written is basic (as I am just learning) but it works fine if Irun it normally and I am generally happy with it. But when it runs at a set time it fails. It copies the kmail.rc across fine, but the tar.gz appears to come across only in name, with very little included in the file.
Any suggestions are welcome.
- Code: Select all
#!/bin/bash
# This will tar and gzip the folder structure
cd /home/jim/.kde/share/apps/kmail
tar cvzf mails.tar.gz mail
# It will also copy this and a separate file across to external drive
cp /home/jim/.kde/share/config/kmailrc /media/IMAGES/testBackupTwo
mv /home/jim/.kde/share/apps/kmail/mails.tar.gz /media/IMAGES/testBackupTwo
****************************************************
This is my crontab -e
0 9 * * * /home/jim/programming/scripts/backupOne
# This file was written by KCron. Copyright (c) 1999, Gary Meyer
# Although KCron supports most crontab formats, use care when editing.
# Note: Lines beginning with "#\" indicates a disabled task.
****************************************************
Many thanks
K
