Hi,
ich habe 2 backup scripts, die mir automatisch inkrementelle Backups erstellen sollen:
backup_full.sh
backup_daily.sh
Damit die jetzt wöchentlich bzw täglich ausgeführt werden habe ich die nach /etc/cron.weekly bzw /etc/cron.daily geschoben und mit execute-rechten versehen.
Meine /etc/crontab sieht so aus:
Anacron ist auch da:
Warum werden die Cronjobs nicht gestartet?
Start-Links für cron und anacron sind auch da:
ich habe 2 backup scripts, die mir automatisch inkrementelle Backups erstellen sollen:
backup_full.sh
Code:
TIMESTAMP=`date +%a_%m-%d-%Y`
tar -vcj -g /srv/backup/snapshot_file -f /srv/backup/BACKUP_FULL_$TIMESTAMP.tar.bz2 /home
backup_daily.sh
Code:
TIMESTAMP=`date +%a_%m-%d-%Y`
tar -vcj -g /srv/backup/snapshot_file -f /srv/backup/BACKUP_DAILY_$TIMESTAMP.tar.bz2 /home
Damit die jetzt wöchentlich bzw täglich ausgeführt werden habe ich die nach /etc/cron.weekly bzw /etc/cron.daily geschoben und mit execute-rechten versehen.
Code:
mathias@wizard:/etc/cron.weekly$ ls -l | grep backup
-rwxr-xr-x 1 root root 120 2008-09-28 11:52 backup_full.sh
mathias@wizard:/etc/cron.weekly$
Code:
TIMESTAMP=`date +%a_%m-%d-%Y`
tar -vcj -g /srv/backup/snapshot_file -f /srv/backup/BACKUP_DAILY_$TIMESTAMP.tar.bz2 /home
Meine /etc/crontab sieht so aus:
Code:
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# minute
# hour
# day_of_month
# month
# day_of_week
# user
# command
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
Anacron ist auch da:
Code:
mathias@wizard:~/bin$ which anacron
/usr/sbin/anacron
mathias@wizard:~/bin$
Warum werden die Cronjobs nicht gestartet?
Start-Links für cron und anacron sind auch da:
Code:
mathias@wizard:~$ sudo update-rc.d anacron defaults
[sudo] password for mathias:
System startup links for /etc/init.d/anacron already exist.
mathias@wizard:~$ sudo update-rc.d cron defaults
System startup links for /etc/init.d/cron already exist.
mathias@wizard:~$