Operating Systems > Linux and UNIX
Backup
TheQuirk:
This is in /etc/cron.daily, and it should supposedly make me backups:
--- Code: ---
--- End code ---
Why isn't the damn thing working? I cd-ed into /home2/backup and none of the backups are there. What the hell?
I did ls -l /home2, and I got the following:
[gleb@gleb /]$ ls -l home2
total 20
drwxr-xr-x 2 root root 4096 Dec 8 14:24 backup
drwx------ 2 root root 16384 Nov 21 10:06 lost+found
Now, I don't want anything besides the cron script writing here. What do I do?
TheQuirk:
I know that this is a premission thing, but how do I find the UID for the script?
voidmain:
I would personally never run my backups from cron.daily but there really isn't a reason they shouldn't run. The reason I don't is because I want to pick a specific time to run the backups. cron.daily is run at 4:02am by default (at least on my system according to /etc/crontab).
I run my backups directly from root's crontab. When you do this, any error messages if not redirected to a file will go to root's mailbox. Check root's mail and see if there are any error messages. I usually redirect the output to a file so I can check on any problems, e.g.:
0 2 * * * /root/bin/backup > /root/logs/backup.log 2>&1
The above command is just an example and not one I use. I actually use Amanda for backups. But I'll copy your script into a file and see if I can figure out what might be wrong. One thing you usually want to do when running a script from cron is to use full paths for every command in the script. Some ~/*rc files are not processed and may not contain the full path that you have access to when in a login shell.
I'll let you know what I find out.
voidmain:
Actually, browsing over your script it appears that you have considered the PATH. I assume it runs from the command line?
TheQuirk:
Yes, I only have access to cli. . .
Navigation
[0] Message Index
[#] Next page
Go to full version