Differences

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

Link to this comparison view

Next revision
Previous revision
en:linux:backup:full-rsync-encfs [2012/06/14 00:01] – created alexen:linux:backup:full-rsync-encfs [2020/04/29 06:05] (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.  Notemake 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 a remote directory accessible via rsync over ssh in the form user@host:path.
   * ''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.  
Line 13: Line 13:
  
 This script also requires the encfs password GPG encrypted and stored as ''$target-encfs-password.gpg'' Also, the reverse encfs mount point must be configured before running the script for the first time.  To do this, run ''ENCFS6_CONFIG="/.encfs6.xml" sudo -E encfs --reverse "source-directory" "temporary-mount-point"'' and setting up the encryption as desired.  When that's done, unmount and run the backup script.   This script also requires the encfs password GPG encrypted and stored as ''$target-encfs-password.gpg'' Also, the reverse encfs mount point must be configured before running the script for the first time.  To do this, run ''ENCFS6_CONFIG="/.encfs6.xml" sudo -E encfs --reverse "source-directory" "temporary-mount-point"'' and setting up the encryption as desired.  When that's done, unmount and run the backup script.  
 +
 +If you want to use ths script for a local hard drive, change flags to
 +
 +<code>
 +flags="-avP --delete"
 +</code>
 +
 +and set ''target_dir'' 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. 
  
 ====== backup-system ====== ====== backup-system ======
-<code sh>+<code bash>
 #!/bin/bash #!/bin/bash
 set -f set -f