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
en:linux:backup:full-rsync [2019/04/18 08:00] – [backup-system] alexen:linux:backup:full-rsync [2020/04/29 06:04] (current) – [backup-system] alex
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>
-flags="-avPse ssh --delete --rsync-path=\"rsync --fake-super\""+flags=(-avPse ssh --delete --ignore-errors --rsync-path="rsync --fake-super")
 </code> </code>
  
Line 20: Line 20:
  
 ====== backup-system ====== ====== backup-system ======
-<code sh>+<code bash>
 #!/bin/bash #!/bin/bash
 set -f set -f