| Linux/UNIX Linuxverfechter finden hier Weggefährten. |
Diskussion: Meine Cronjobs laufen nicht im Forum Linux/UNIX, in der Kategorie Operating Systems; Anzeige Hi, ich habe 2 backup scripts, die mir automatisch inkrementelle Backups erstellen sollen: backup_full.sh Code: TIMESTAMP=`date +%a_%m-%d-%Y` tar -vcj ...
![]() |
| | #1 (permalink) |
| Senior Member Registriert seit: 26.03.06 ![]() Likes: 16 | Anzeige Hi, 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 Code: TIMESTAMP=`date +%a_%m-%d-%Y` tar -vcj -g /srv/backup/snapshot_file -f /srv/backup/BACKUP_DAILY_$TIMESTAMP.tar.bz2 /home 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 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 ) # Code: mathias@wizard:~/bin$ which anacron /usr/sbin/anacron mathias@wizard:~/bin$ 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:~$ |
| | |
| | #2 (permalink) |
| Moderator ![]() Registriert seit: 30.09.06 ![]() ![]() ![]() ![]() ![]() ![]() Likes: 441 | Schau doch einfach mal im syslog nach. Da sollte drin stehen, wenn der Cron-Prozess mit irgendwelchen Crons Probleme hat.
__________________ Mein Blog - Mein Job - Diaspora Der Ring uns zu knechten besteht aus 12 Sternen auf blauem Grund. Neue Beiträge im Habo via Twitter - Das HaBo auf FB - Das HaBo bei G+ |
| | |
| HaBOT | - Anzeige - |
| |
| | #3 (permalink) |
| Senior Member Themenstarter Registriert seit: 26.03.06 ![]() Likes: 16 | Also wenn ich so in syslog schau fällt mir nichts auf: Code: Oct 12 18:17:01 wizard /USR/SBIN/CRON[15724]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Oct 12 18:25:01 wizard /USR/SBIN/CRON[15734]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; })
Oct 12 18:35:01 wizard /USR/SBIN/CRON[15768]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; })
Oct 12 18:45:01 wizard /USR/SBIN/CRON[15803]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; })
Oct 12 18:55:01 wizard /USR/SBIN/CRON[15972]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; })
Oct 12 19:05:01 wizard /USR/SBIN/CRON[16526]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; })
Oct 12 19:15:01 wizard /USR/SBIN/CRON[16545]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; })
Oct 12 19:17:01 wizard /USR/SBIN/CRON[16550]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Oct 12 19:25:01 wizard /USR/SBIN/CRON[16556]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; })
Oct 12 19:35:01 wizard /USR/SBIN/CRON[16618]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; })
Oct 12 19:45:01 wizard /USR/SBIN/CRON[16634]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; })
Oct 12 19:55:01 wizard /USR/SBIN/CRON[16644]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; })
Oct 12 20:05:01 wizard /USR/SBIN/CRON[16653]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; })
Oct 12 20:15:01 wizard /USR/SBIN/CRON[16756]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; }) EDIT: Nach ewiger Zeit bin ich endlich zufällig drauf gestoßen: Namen von Scripts in /etc/cron.weekly etc dürfen müssen auf folgend regex matchen: ^[a-zA-Z0-9_-]+$ dh mein Name backup_full.sh war wegen dem "." nicht erlaubt ... cu serow |
| | |
![]() |
| - Anzeige - | |
| |
| Themen-Optionen | |
| Ansicht | |
| |
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Bekomme WLAN nicht ans Laufen | Serow | Network · LAN, WAN, Firewalls | 6 | 28.06.06 23:13 |
| cgi::irc will auf portland nicht laufen | sirphreak | (Web-) Design und webbasierte Sprachen | 9 | 05.10.03 17:14 |
| Cybersex. So sollte er nicht laufen. | Tec | Fun Section | 5 | 30.03.03 03:50 |
| Kriege den "Esel" nicht zum laufen!!! | SiRRiuS | Applikationen | 3 | 19.02.02 11:50 |
| Video CD\'s laufen nicht | Bowie | Music- & Filmbox | 26 | 18.11.01 20:20 |