Kurobox NAS-Central Forums

Welcome to the Kuro Community
It is currently Fri Apr 20, 2018 10:44 am

All times are UTC-06:00




Forum locked  This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
PostPosted: Tue Sep 12, 2006 1:27 pm 
Offline

Joined: Tue Sep 12, 2006 1:13 pm
Posts: 4
All

I have Kurobox HG with Sylver. I also have a USB hard drive attached to it. I want to backup my movie folder to the USB hard drive.
I have installed rsync and I can sync my "Movie" folder in Kurobox with my USB drive.

rsync -a /mnt/movie/ /mnt2/usbdisk1/

This works great, but I want to schedule it with cron. I cannot make this work for some reasons. Please let me know what I am doing wrong. I have tried the following, but none of them worked.

1. log on as root and run "crontab -e".
Then add 00 4 * * * rsync -a /mnt/movie/ /mnt2/usbdisk1/

2. create a file called "backup.sh" in /usr/local/bin
Then, add rsync -a /mnt/movie/ /mnt2/usbdisk1/ in the script
After that run "crontab -e" and add
00 4 * * * /usr/local/bin/backup.sh
Lastly, run chmod 755 backup.sh

3. added the same backup.sh in cron.d folder.

I am still new to Linux and still learning little by little. I would appreciate your input.


Top
   
 Post subject:
PostPosted: Tue Sep 12, 2006 8:35 pm 
Offline

Joined: Fri May 26, 2006 12:59 pm
Posts: 21
Location: Limerick, Ireland
What do mean when you say it does not work? Does the job get run and not work, or does the job not get run at all?

Maybe try this as your cron job

0 4 * * * rsync -av /mnt/movie/ /mnt2/usbdisk1/ > $HOME/output.txt 2>&1

This will backup the movie dir at 4 am everyday and leave the output of the rsync command in the file ~/output.txt


Top
   
 Post subject: Well, I think it worked
PostPosted: Tue Sep 12, 2006 10:00 pm 
Offline

Joined: Tue Sep 12, 2006 1:13 pm
Posts: 4
I think it worked.

I meant it didn't seem to run at all with the crontab entry. (at least last night)

I entered number of entries like below because I do not know which one works, but it seems one of them did the job at least. Which line is the correct one?

20 10 * * * /etc/cron.d/backup.sh
30 10 * * * /etc/cron.d/backup
40 10 * * * /root/scripts/set_backup.sh
50 10 * * * /usr/local/bin/rsync -a /mnt/movie/ /mnt2/usbdisk1
00 11 * * * /usr/local/bin/rsync -a /mnt/movie/ /mnt2/usbdisk1/
10 11 * * * /usr/local/bin/rsync -a /mnt/movie/ /mnt2/usbdisk1/.
20 11 * * * root /usr/local/bin/rsync -a /mnt/movie/ /mnt2/usbdisk1/


Top
   
Display posts from previous:  Sort by  
Forum locked  This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited