Differences

This shows you the differences between two versions of the page.

Link to this comparison view

nasbox [2011/05/07 13:30]
spclab
nasbox [2013/04/19 13:25] (current)
Line 1: Line 1:
 +From: Santhosh Kumar
 +
 +To: SPC Lab
 +
 +Dear all,
 +
 +There are simple and efficient ways to back-up your important data periodically and more importantly automatically, if you are using Linux. In the following I will briefly explain a way to automatically schedule the back-up daily. 
 +
 +1) Install the package rsync. "rsync" is an excellent package that can synchronize incrementally. That is if you want to back-up a folder containing three files and if you have modified only one file since your last back-up, rsync observes this and updates only the necessary file. 
 +
 +If you are using Ubuntu/Debian, do:
 +
 +$ sudo apt-get install rsync
 +
 +2) Download the scripts.zip attached with this email and extract it into your home folder. 
 +
 +3) Open the file scripts/backup_script.sh (inside the extracted scripts folder) and edit the following two variables:
 +
 +LOCAL_FOLDER=/home/USER/Desktop/Recent_Project
 +BACKUP_FOLDER=/media/USER_NASBOX/BackUp
 +
 +If you are, say, backing up the entire desktop, then change the LOCAL_FOLDER line to:
 +LOCAL_FOLDER=/home/YOUR_LOGIN_NAME/Desktop
 +
 +If you are backing up the data into the NAS Box and if you have mounted your personal NASBOX folder in /media/MY_NASBOX and want your back-up done in the folder "BackUp" inside NASBOX, then change the BACKUP_FOLDER line to:
 +BACKUP_FOLDER=/media/MY_NASBOX/BackUp
 +
 +Save the file and close.
 +
 +4) Open the file scripts/setcron.sh and edit the line number 4, which looks like:
 +echo "53 13 * * * /bin/bash $PWD/backup_script.sh" > $TMP_FILE
 +
 +13 and 53 represent the time of the day at which the back-up is done. If you want to start the back-up at 4:12 PM (16:12), then replace 53 with 12 and 13 with 16. Please note that the minute value should come before the hour value. The line, after modification, should look like:
 +echo "12 16 * * * /bin/bash $PWD/backup_script.sh" > $TMP_FILE
 +
 +Please pick an arbitrary convenient time for the back-up, so that your back-up time does not clash with the others using the same back-up procedure. This will reduce the load on the NAS Box.
 +
 +5) If you have extracted the scripts folder into home directory, do:
 +$ cd $HOME/scripts 
 +$ ./setcron.sh 
 +
 +That is all!
 +Though this email looks quite lengthy, the underlying procedure is fairly simple. Do try this and inform me if you have any issues or questions or suggestions.
 +Thank You.
 +
 +The required scripts can be found {{:scripts.zip|here}}.
 +
  

Personal Tools