User Tools

Site Tools


backing_up_home_using_rsync

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
backing_up_home_using_rsync [2021/03/16 03:30] – [Trailing directory slashes] hc9backing_up_home_using_rsync [2022/11/30 13:27] (current) – [Requirements] n3t
Line 1: Line 1:
-====== Backing Up $HOME Using rsync ======+====== Backing Up $HOME ======
  
 ===== Why should I backup? ===== ===== Why should I backup? =====
Line 7: Line 7:
 ===== 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''/''scp'' 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'', ''rsync''/''scp'' 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, open source, and very flexible. It is possible to create a variety of different backups using 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, open source, and very flexible. It is possible to create a variety of different backups using rsync.
 +
 +===== rsync not available? =====
 +
 +''rsync'' have to be installed on both local and remote host, for example your own computer and SDF. For members below [[membership_levels#metaarpasustaining_membership_level|ARPA]], ''rsync'' will not be available to them, in this case ''scp'' could be used as an alternative, here's a simple example to be executed on your local machine:
 +
 +''scp -r username@sdf.org:/path/to/home /local/backup/dir''
 +
 +What does this mean? \\
 +
 +  * ''-r'' : Recursively copy entire directories.
 +  * ''username'': Your SDF username.
 +  * ''/path/to/home'' [[#for_example:|[1]]] : The path to the directory you wish to backup.
 +  * ''/local/backup/dir'' : Where you would like the files to be stored locally.
 +
 +
  
 ===== Basic rsync backup. ===== ===== Basic rsync backup. =====
Line 21: Line 36:
 You will be using rsync on a machine to CONNECT TO SDF. What follows is NOT designed to be run from SDF. On the machine you wish to backup your SDF home directory to, issue the following: You will be using rsync on a machine to CONNECT TO SDF. What follows is NOT designed to be run from SDF. On the machine you wish to backup your SDF home directory to, issue the following:
  
-''rsync -avz -e ssh //username//@sdf.lonestar.org:/path/to/home /local/backup/dir''+''rsync -avz -e ssh //username//@sdf.org:/path/to/home /local/backup/dir''
  
 What does this mean? \\ What does this mean? \\
Line 30: Line 45:
   * ''-e'' : specify the shell to be used. This is being used here to rsync over a secure shell connection.   * ''-e'' : specify the shell to be used. This is being used here to rsync over a secure shell connection.
   * //username// : your SDF username.   * //username// : your SDF username.
-  * ''/path/to/home'' [[#caveats_and_extras|[1]]] : The path to the directory you wish to backup.+  * ''/path/to/home'' [[#for_example:|[1]]] : The path to the directory you wish to backup.
   * ''/local/backup/dir'' : Where you would like the files to be stored locally.   * ''/local/backup/dir'' : Where you would like the files to be stored locally.
  
Line 45: Line 60:
 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.
  
-=For example:=+== For example: ==
  
 ''rsync -avz -e ssh username@sdf.lonestar.org:/path/to/home /local/backup/dir'' ''rsync -avz -e ssh username@sdf.lonestar.org:/path/to/home /local/backup/dir''
backing_up_home_using_rsync.1615865414.txt.gz · Last modified: 2021/03/16 03:30 by hc9