Cron führt Scripte nicht aus
OS: Debian Sarge,
Guten Morgen alle zusammen,
Ich habe eine Debian Sarge Server. Über Cron führe ich das AntiViren update aus.
Das funktioniert auch. Dafür habe ich das Script einfach in .cron.hourly kopiert.
Jetzt wollte ich gerne auch ein Netzlaufwerk ein Backup per Script machen.
Zuerst habe ich das Script einfach in Cron.daily und ein anderes in cron.weekly kopiert.
Dies wurde aber nicht ausgeführt. Also habe ich gestern per crontab –e die beiden Scripte in die Crontab geschireben und an einen anderen Ort kopiert. Diese werden aber immer noch nicht ausgeführt. Hat jemand einen Tipp???
Das script:
Crontab –l
0 21 * * * /root/script/backup.samba
0 21 * * 0 /root/script/backup.woche
Ich habe eine Debian Sarge Server. Über Cron führe ich das AntiViren update aus.
Das funktioniert auch. Dafür habe ich das Script einfach in .cron.hourly kopiert.
Jetzt wollte ich gerne auch ein Netzlaufwerk ein Backup per Script machen.
Zuerst habe ich das Script einfach in Cron.daily und ein anderes in cron.weekly kopiert.
Dies wurde aber nicht ausgeführt. Also habe ich gestern per crontab –e die beiden Scripte in die Crontab geschireben und an einen anderen Ort kopiert. Diese werden aber immer noch nicht ausgeführt. Hat jemand einen Tipp???
Das script:
#!/bin/sh
# --- Samba Dateien Backup ---
mkdir /tmp/smbtmp
tar -czlpf - /var/spool/samba 2>/dev/null | split -b 2000m - /tmp/smbtmp/malone-samba.
cp /tmp/smbtmp/* /mnt/backup2/malone/samba/tag/
rm -r /tmp/smbtmp
### Old Backup Script
# smbmount //backup.be.de/malone /mnt/backup -o username=alone,password=elam
#
# tar -czlpf - /var/spool/samba 2>/dev/null | split -b 2000m - /mnt/backup/malone/samba/tag/malone-samba.
#
# smbumount /mnt/backup 2>/dev/null
#
#
# smbumount /mnt/backup 2>/dev/null
exit 0
Crontab –l
0 21 * * * /root/script/backup.samba
0 21 * * 0 /root/script/backup.woche
Please also mark the comments that contributed to the solution of the article
Content-Key: 69420
Url: https://administrator.de/contentid/69420
Printed on: April 19, 2024 at 00:04 o'clock
2 Comments
Latest comment