rdiff-backup

rdiff-backup - local/remote mirror and incremental backup

rdiff-backup is a script, written in python

* GPL-licensed
* based on (lib)rsync
* Keeps statistics: After each session rdiff-backup writes summary statistics to a text file.
- session_statistics
- file_statistics

Install

fuse-rdiff-backup-fs.i686                   1.0.0-1.el6.rf              rpmforge
rdiff-backup.i686                           1.2.8-4.el6.rf              rpmforge

Test:

# by default ssh will attempt to log you in with the same username you have on the local host
rdiff-backup --test-server hostname.net::/ignored

Backup:

rdiff-backup path/to/source path/to/backup/destination

Useful Opts:

        verbosity -v5
        
0    No information given
1    Fatal Errors displayed
2    Warnings
3    Important messages, and maybe later some global statistics (default)
4    Some global settings, miscellaneous messages
5    Mentions which files were changed
6    More information on each file processed
7    More information on various things
8    All logging is dated
9    Details on which objects are moving across the connection
        

File selection

    --exclude /tmp --exclude /mnt --exclude /proc
    
     ** matches any path and * matches any path without a / in it
    
     rdiff-backup --include /usr/local --include /var --exclude '**' / /backup
    
     rdiff-backup --include-filelist mylist --exclude '**' / /backup
    
     /home
     /etc
    

--include-globbing-filelist

    **txt
    - /usr/local/games
    /usr/local
    - /usr
    - /backup
    - /proc

    
    
Example:

remote incremental backup
        
rdiff-backup dir1 host.net::/dir2
        
        
        
# versions which have not been current for 2 weeks
rdiff-backup --remove-older-than 2W host.net::/remote-dir        
        
# To purge any snapshots older than two months
rdiff-backup --force --remove-older-than 2M path/to/backup/destination

rdiff-backup-fs

Resultant incremental data can be viewed and restored from as if it were whole file backups

* FUSE-based

# lists all the files under out-dir/subdir which has changed in the last 5 days.

    rdiff-backup --list-changed-since 5D out-dir/subdir

    
# lists the times of the available versions

# --list-increments
rdiff-backup -l out-dir/file

-b, --backup-mode
              Force backup mode
              
--calculate-average
              Enter  calculate average mode
              
--verify (--verify-at-time now)

              Check  all  the data in the repository at the given time by com-
              puting the SHA1 hash of all the regular files and comparing them
              with the hashes stored in the metadata file.      
              
===============================================

Restore:

<1>

rdiff-backup-fs path/to/mount/point path/to/backup/destination
cp -p path/to/mount/point/YYYY-MM-DDTHH\:MM\:SS/some/thing where/ever/

unmount:

/bin/fusermount -u path/to/mount/point

<2>

rdiff-backup -r now host.net::/remote-dir/file local-dir/file

--restore-as-of (-r)   tells rdiff-backup to restore instead of backup
now option indicates the current time

# version history (10 days ago)
rdiff-backup -r 10D host.net::/remote-dir/file /tmp/file

===============================================
backup files to a sshfs mount

# sshfs 1.3
specify the "-o workaround=rename" option to sshfs

===============================================
Increment file types

snapshot - A snapshot increment file is an exact copy of its associated source file
diff - A diff snapshot has the same metafile information (permissions, etc.)
missing markers - Missing markers indicate that the associated source file does not exist at the given time
dir markers - Dir markers just indicate that the associated source file is a directory

===============================================
DOC:

http://www.nongnu.org/rdiff-backup/rdiff-backup.1.html

Creative Commons license icon Creative Commons license icon