BackupSomeDirectoriesOnly

From RdiffBackupWiki

Jump to: navigation, search

(Text deleted)

Contents

solution #1:

 rdiff-backup --include /root --include '/etc/apache*' --include '/etc/auto*' --exclude / / targethost::/sourcebackup

solution #2:

 cat > rdiff_backup_includes.txt
 /root
 /etc/apache*
 /etc/auto*
 /etc/mysql
 /etc/exports
 /etc/passwd
 /etc/shadow
 /etc/groups
 rdiff-backup --include-globbing-filelist rdiff_backup_includes.txt --exclude / / target_host::/backup/source_backup

Exclude Some Files Only

I want to backup all files in a certain folder, except those with these extensions qic, bkf

 rdiff-backup --exclude-regexp "(?i).*.(qic||bkf)$"

solution #3:

Use globbing filelist for includes and excludes, this allows absolute manipulation of what you want backed up.

 rdiff-backup -v5 --print-statistics --include-globbing-filelist /etc/filelist.inc \
   --exclude-globbing-filelist /etc/filelist.exc /mnt/location/ root@remoteserver::/mnt/backupdisk/data
Personal tools