Differences

This shows you the differences between the selected revision and the current version of the page.

howto:backup 2009/01/14 20:13 howto:backup 2017/09/06 18:38 current
Line 1: Line 1:
-====== HOWTO Backup ======+====== HOWTO Backup ======
This is a step-by-step tutorial on how to set up your DNS-323 for backup.  The contents were copied from the following threads: This is a step-by-step tutorial on how to set up your DNS-323 for backup.  The contents were copied from the following threads:
-  * [[http://forum.dsmg600.info/t1150-Tutorial%3A-Backup-Everything-from-once-night.html|Tutorial: Backup Everything from Vol A to Vol B once a night by Chumby]] +  * [[http://dns323.kood.org/forum/t1150-Tutorial%3A-Backup-Everything-from-once-night.html|Tutorial: Backup Everything from Vol A to Vol B once a night by Chumby]] 
-  * [[http://forum.dsmg600.info/t2125-DNS-323-Rsync-Time-Machine%21.html|DNS-323 Rsync Time Machine! by raid123]]+  * [[http://dns323.kood.org/forum/t2125-DNS-323-Rsync-Time-Machine%21.html|DNS-323 Rsync Time Machine! by raid123]] 
 +  * DNS-323 Online Backup service announcement. 
 + 
 +===== How To Backup the DNS-323 Online ===== 
 + 
 +With the release of firmware v1.09, an integrated online backup service was added to DNS-323. 
 + 
 +The site [[http://dlink.ctera.com]] contains setup information, including a video walk-through, features and pricing. You can also register for the service, and there is a 30-day free trial. The service includes the following features:  
 + 
 +  * Automatically back up your DNS-323 online 
 +  * Restore lost data using a Web browser 
 +  * Recover previous versions of your files 
 +  * No PC software installation required 
 + 
 +The DNS-323 Online Backup Service uses block-level incremental backup with data compression and deduplication, for conserving Internet connection bandwidth. 
 + 
===== How To Back Up From Drive A To Drive B Once A Night ===== ===== How To Back Up From Drive A To Drive B Once A Night =====
Line 62: Line 78:
Please note: If you are using fun plug 0.3 or 0.5, rsync will install automatically and you do not need to go through this step. Please note: If you are using fun plug 0.3 or 0.5, rsync will install automatically and you do not need to go through this step.
 +
==== Step 3: Create a Scheduled Backup ==== ==== Step 3: Create a Scheduled Backup ====
Line 115: Line 132:
<code> <code>
chmod a+x /mnt/HD_a2/fun_plug.d/start/editcron.sh chmod a+x /mnt/HD_a2/fun_plug.d/start/editcron.sh
 +</code>
 +
 +5) The /mnt/HD_a2/fun_plug.d/log directory must already exist.  If it doesn't, create it:
 +<code>
 +mkdir /mnt/HD_a2/fun_plug.d/log
</code> </code>
Line 132: Line 154:
When your scheduled time arrives, both HD lights on the dns323 start flashing away. Everything is working fine!  Enjoy hassle free backups from now on! When your scheduled time arrives, both HD lights on the dns323 start flashing away. Everything is working fine!  Enjoy hassle free backups from now on!
 +
 +
Line 142: Line 166:
In a nutshell, this is a way of using rsync's hard link functionality to make a full backup, but creating hard links and saving space if the file already existed in the previous backup.  The way hard links work, for those of you who aren't familiar, is like a ref-counting system where multiple files share the actual data.  Until all hard links are deleted, the file will continue to exist. In a nutshell, this is a way of using rsync's hard link functionality to make a full backup, but creating hard links and saving space if the file already existed in the previous backup.  The way hard links work, for those of you who aren't familiar, is like a ref-counting system where multiple files share the actual data.  Until all hard links are deleted, the file will continue to exist.
-This tutorial assumes you have already set up backup from drive A to drive B above. +The script checks for the existence of the previous backup by looking for the symbolic link named 'current' which points to the last backup.
- +
- +
- +
==== Step 1: Create snapshot.sh ==== ==== Step 1: Create snapshot.sh ====
Line 173: Line 193:
mkdir $dstpath/$date mkdir $dstpath/$date
-$ffppath/bin/rsync -aivx --link-dest=$dstpath/current $srcpath $dstpath/$date > $ffppath/log/snapshot.log 2>&1+$ffppath/bin/rsync -avx --ignore-errors --link-dest=$dstpath/current $srcpath $dstpath/$date > $ffppath/log/snapshot.log 2>&1
var=`ls -1A $dstpath/$date | wc -l` var=`ls -1A $dstpath/$date | wc -l`
Line 196: Line 216:
</code> </code>
-Finally, make the script executable:+Make the script executable:
<code> <code>
-chmod a+x /ffp/start/snapshot.sh+chmod a+x /ffp/bin/snapshot.sh
</code> </code>
- +Finally, ensure the /ffp/log directory already exists.  If it doesn't, create it: 
- +<code> 
 +mkdir /ffp/log 
 +</code>
==== Step 2: Modify editcron.sh ==== ==== Step 2: Modify editcron.sh ====
Line 268: Line 289:
Each folder now contains a different snapshot, and you can delete the backup from any day, or recover any file from any day, without worrying about how it would affect the previous or the next backup!  Congratulations, you now have your own Time Machine in your DNS-323! Each folder now contains a different snapshot, and you can delete the backup from any day, or recover any file from any day, without worrying about how it would affect the previous or the next backup!  Congratulations, you now have your own Time Machine in your DNS-323!
 +
==== Troubleshooting ==== ==== Troubleshooting ====
If no current link is created, or current is pointing to the wrong (=old) directory after running the script via cron, add If no current link is created, or current is pointing to the wrong (=old) directory after running the script via cron, add
  export PATH=/ffp/sbin:/ffp/bin:$PATH   export PATH=/ffp/sbin:/ffp/bin:$PATH
-as the second line in your script. This will set up the ffp 0.5 environment needed for cronjobs on some machines. If you are using an older version of ffp, alter the path accordingly.+as the second line in your script. This will set up the ffp 0.5 environment needed for cronjobs on some machines. If you are using an older version of ffp, alter the path accordingly
 + 

Navigation

Personal Tools