Both sides previous revisionPrevious revisionNext revision | Previous revision |
backing_up_home_using_rsync [2022/11/30 13:22] – [Why rsync?] n3t | backing_up_home_using_rsync [2024/07/20 07:48] (current) – [Why should I backup?] f.l hc9 |
---|
====== Backing Up $HOME Using rsync ====== | ====== Backing Up $HOME ====== |
| |
===== Why should I backup? ===== | ===== Why should I backup? ===== |
| |
As is [[http://sdf.lonestar.org/index.cgi?faq?MISC?01| clearly outlined in the FAQ]], SDF backups up system files only. SDF does NOT maintain backups of userspace. If there is something stored in your home directory that is important to you then you need to take on the responsibility of protecting it. Paragraph two of the [[http://sdf.lonestar.org/index.cgi?abuse/aup|SDF AUP]] also clearly outlines the fact that taking care of your files is your responsibility. | As is [[http://sdf.org/index.cgi?faq?MISC?01| clearly outlined in the FAQ]], SDF backups up system files only. SDF does NOT maintain backups of userspace. If there is something stored in your home directory that is important to you then you need to take on the responsibility of protecting it. Paragraph two of the [[http://sdf.org/index.cgi?abuse/aup|SDF AUP]] also clearly outlines the fact that taking care of your files is your responsibility. |
| |
===== 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'' 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: | ''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'' | ''scp -r username@sdf.org:/path/to/home /local/backup/dir'' |
| |
What does this mean? \\ | What does this mean? \\ |
| |
* ''-r'' : Recursively copy entire directories. | * ''-r'' : Recursively copy entire directories. |
* //username// : your SDF username. | * ''username'': Your SDF username. |
* ''/path/to/home'' [[#for_example:|[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. |
| |
| |
| |
===== Basic rsync backup. ===== | ===== Basic rsync backup. ===== |
== For example: == | == For example: == |
| |
''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'' |
| |
The above would produce "/local/backup/dir/path/to/home" on the destination machine. Adding the trailing slash on the source directory would simply dump the contents of of the directory into the destination dir. | The above would produce "/local/backup/dir/path/to/home" on the destination machine. Adding the trailing slash on the source directory would simply dump the contents of of the directory into the destination dir. |