Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:linux:backup:full-rsync [2019/04/18 10:01]
alex [Full system rsync]
en:linux:backup:full-rsync [2020/04/29 08:04] (current)
alex [backup-system]
Line 7: Line 7:
   * ''​target''​ : system to back up, must be set to output of ''​uname -n''​. ​ Used as a sanity check.  ​   * ''​target''​ : system to back up, must be set to output of ''​uname -n''​. ​ Used as a sanity check.  ​
   * ''​source_dir''​ : source directory. ​ Set to ''/''​ for full system backup.   * ''​source_dir''​ : source directory. ​ Set to ''/''​ for full system backup.
-  * ''​target_dir''​ : target directory. ​ Set to the mountpoint of an external hard drive. ​ Note: make sure that ''​target_dir''​ or a parent is included in ''​exclude_dir''​ otherwise rsync will recurse and your hard drive will get filled up completely.  ​+  * ''​target_dir''​ : target directory. ​ Set to the mountpoint of an external hard drive or a remote server.  Note: make sure that ''​target_dir''​ or a parent is included in ''​exclude_dir''​ otherwise rsync will recurse and your hard drive will get filled up completely.  ​
   * ''​exclude_dir''​ : excluded directories. ​ Set these to temporary directories and other things you don't want backed up.  ​   * ''​exclude_dir''​ : excluded directories. ​ Set these to temporary directories and other things you don't want backed up.  ​
   * ''​include_dir''​ : included directories. ​ Subfolders of excluded directories to include.  ​   * ''​include_dir''​ : included directories. ​ Subfolders of excluded directories to include.  ​
  
-If you want to use this script with a remote host, change flags to+If you want to use this script with a remote host where the target user is not root, change flags to
  
 <​code>​ <​code>​
Line 20: Line 20:
  
 ====== backup-system ====== ====== backup-system ======
-<​code ​sh>+<​code ​bash>
 #!/bin/bash #!/bin/bash
 set -f set -f