Differences

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

Link to this comparison view

rdiff-backup [2012/12/03 15:48] (current)
Line 1: Line 1:
 +====== rdiff-backup ======
  
 +rdiff-backup is a script, written in python that backs up one directory to another.
 +
 +=== Backing Up ===
 +
 +Simple backup
 +
 +<​code>​
 +rdiff-backup user@server.com::/​var/​www/​localhost server.com
 +</​code>​
 +
 +Ignore .git directory and display files being archived:
 +
 +<​code>​
 +rdiff-backup -v5 --exclude '​**.git'​ /​var/​www/​localhost/​htdocs /​var/​storage/​rdiff/​server.com
 +</​code>​
 +
 +=== Restoring ===
 +
 +<​code>​
 +rdiff -r 7D /var/source /var/dest
 +</​code>​
 +
 +=== Deleting old copies ===
 +
 +==== Server Configuration ====
 +
 +**Initial archive**
 +
 +<​code>​
 +rdiff-backup -v5 --exclude '​**.git'​ /​var/​www/​localhost/​htdocs /​var/​storage/​rdiff/​server.com
 +</​code>​
 +
 +**Local cron job**
 +
 +<​code>​
 +0 2 * * * rdiff-backup --exclude '​**.git'​ /​var/​www/​localhost/​htdocs /​var/​storage/​rdiff/​server.com &> /dev/null
 +</​code>​
 +
 +**Remote cron job**
 +
 +<​code>​
 +0 2 * * * rdiff-backup --exclude '​**.git'​ server.com::/​var/​www/​localhost/​htdocs /​var/​storage/​rdiff/​server.com &> /dev/null
 +</​code>​