This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tutorials:rsync-backup [2011/04/30 14:38] – created clemens | tutorials:rsync-backup [2012/05/05 20:11] (current) – Link fix, $ID memnon | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== Content ===== | ===== Content ===== | ||
- | * [[#why|Why should I backup?]] | + | * [[#Why should I backup?]] |
- | * [[#requirements|Requirements]] | + | * [[# |
- | * [[#rsync|Why rsync?]] | + | * [[#Why rsync?]] |
- | * [[#backup|Basic rsync backup.]] | + | * [[#Basic rsync backup.]] |
- | * [[#restoring|Restoring]] | + | * [[# |
- | * [[#caveats|Caveats and extras]]\\ | + | * [[#Caveats and extras]]\\ |
- | * [[#slashes|Trailing directory slashes]] | + | * [[#Trailing directory slashes]] |
- | * [[#delete|The " | + | * [[#The " |
- | * [[#links|Rsync and symlinks]] | + | * [[#Rsync and symlinks]] |
- | * [[#cron|Rsync and Cron]] | + | * [[#Rsync and Cron]] |
\\ | \\ | ||
- | ===== [[|Why should I backup?]] ===== | + | ===== Why should I backup? ===== |
As is [[http:// | As is [[http:// | ||
- | ===== [[|Requirements]] ===== | + | ===== Requirements ===== |
What you will need to perform a mirror of your home directory on SDF to another location is a computer with ssh and rsync installed and enough space to store your SDF files. The instructions below are being run on an x86 running Linux, but should be suitable for Mac OS/X and Windows running cygwin. Please read the ssh and rsync documentation on those platforms for any differences. | What you will need to perform a mirror of your home directory on SDF to another location is a computer with ssh and rsync installed and enough space to store your SDF files. The instructions below are being run on an x86 running Linux, but should be suitable for Mac OS/X and Windows running cygwin. Please read the ssh and rsync documentation on those platforms for any differences. | ||
- | ===== [[|Why rsync?]] ===== | + | ===== Why rsync? ===== |
Rsync will allow you to syncronize your data on SDF to an area on another computer. Using rsync will enable you to copy only new files or files that have changed. This saves bandwidth for both parties and greatly speeds up the operation. Rsync is in current development, | Rsync will allow you to syncronize your data on SDF to an area on another computer. Using rsync will enable you to copy only new files or files that have changed. This saves bandwidth for both parties and greatly speeds up the operation. Rsync is in current development, | ||
- | ===== [[|Basic rsync backup.]] ===== | + | ===== Basic rsync backup. ===== |
Only a portion of rsync' | Only a portion of rsync' | ||
Line 46: | Line 46: | ||
* " | * " | ||
* // | * // | ||
- | * "/ | + | * "/ |
* "/ | * "/ | ||
You will be prompted for your SDF password. Upon completion, rsync will report a few statistics to you such as the amount of data transfered and your average throughput. When you run this command subsiquently rsync will only backup new and changed files. | You will be prompted for your SDF password. Upon completion, rsync will report a few statistics to you such as the amount of data transfered and your average throughput. When you run this command subsiquently rsync will only backup new and changed files. | ||
- | ===== [[|Restoring]] ===== | + | ===== Restoring ===== |
Restoring a single file is as easy as using " | Restoring a single file is as easy as using " | ||
- | ===== [[|Caveats and extras]] ===== | + | ===== Caveats and extras ===== |
- | ==== [[|Trailing directory slashes]] ==== | + | ==== Trailing directory slashes ==== |
Most often, the trailing slash when specifying a directory is optional. To rsync, however, the trailing slash has meaning when specifying the source directory. Omitting the trailing slash cause the entire directory structure of the source files to be recreated on the destination machine. Specifying the trailing slash, however, causes the directory structure only to be recreated from the given directory. | Most often, the trailing slash when specifying a directory is optional. To rsync, however, the trailing slash has meaning when specifying the source directory. Omitting the trailing slash cause the entire directory structure of the source files to be recreated on the destination machine. Specifying the trailing slash, however, causes the directory structure only to be recreated from the given directory. | ||
Line 67: | Line 67: | ||
The above would produce "/ | The above would produce "/ | ||
- | ==== [[|The " | + | ==== The " |
Rsync' | Rsync' | ||
- | ==== [[|Rsync and symlinks]] ==== | + | ==== Rsync and symlinks ==== |
As stated above, the default behavior for copying links with rsync' | As stated above, the default behavior for copying links with rsync' | ||
- | ==== [[|Rsync and Cron]] ==== | + | ==== Rsync and Cron ==== |
Backups work best if they are done regularly. A nice way to make sure you don't forget to make regular backups is to have your computer remember for you by placing your rsync command in a cron job. Due to a password being involved, this is not a completly straightforward task and some caution is required. For a very good first read on this subject, please read [[http:// | Backups work best if they are done regularly. A nice way to make sure you don't forget to make regular backups is to have your computer remember for you by placing your rsync command in a cron job. Due to a password being involved, this is not a completly straightforward task and some caution is required. For a very good first read on this subject, please read [[http:// | ||
+ | |||
+ | $Id: rsync-backup.html, |