LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   rdiff-backup exclude lists (https://www.linuxquestions.org/questions/linux-software-2/rdiff-backup-exclude-lists-4175567802/)

pointer2null 01-24-2016 03:03 PM

rdiff-backup exclude lists
 
Hi All.

I'm trying to write a backup script using rdiff-backup and all works fine except the exclude list.

I can't get it right and can't find any examples out there.

Basically, I have a bash function that I pass a source directory, a target directory and an exclude list to.

I wanted to use a common exclude list, to save defining it for each directory. So I wanted to exclude any svn files, and gvfs (gnome virtual file system), Cache dir etc etc etc. A mix of directories and file types.

This list should be able to be used on any source even if it contains none of the exclude categories.

I tried:

Code:

EXCLUDELIST="--exclude '**.svn*' --exclude '**.cache' --exclude '**/Downloads' --exclude '**/nobackup' --exclude '**/Cache' --exclude '**/.gvfs' --exclude '**/.local/share/Trash/files' --exclude '**/.thumbnails' --exclude '**/.Trash'""
and other variations with more or less *'s and backslashes etc etc.

Nothing seems to work - it either does nothing or causes rdiff-backup to throw an error.

Someone must have done this before?

rknichols 01-24-2016 03:17 PM

In your script, put a "set -x" command right before the rdiff-backup command line and post what the shell is actually trying to execute there. My guess is that it's either a quoting problem or having the arguments to rdiff-backup in the wrong order.

pointer2null 01-24-2016 03:26 PM

logs
 
Quote:

rdiff-backup --print-statistics -v5 --exclude '/**/*.svn*' --exclude '/**/.cache' --exclude '/**/Downloads' --exclude '/**/nobackup' --exclude '/**/Cache' --exclude '/**/.gvfs' --exclude '/**/.local/share/Trash/files' --exclude '/**/.thumbnails' --exclude '/**/.Trash' /shares/general /mnt/rnbackup/general
Quote:

Using rdiff-backup version 1.2.8
POSIX ACLs not supported by filesystem at /shares/general
Unable to import win32security module. Windows ACLs
not supported by filesystem at /shares/general
escape_dos_devices not required by filesystem at /shares/general
-----------------------------------------------------------------
Detected abilities for source (read only) file system:
Access control lists Off
Extended attributes On
Windows access control lists Off
Case sensitivity On
Escape DOS devices Off
Escape trailing spaces Off
Mac OS X style resource forks Off
Mac OS X Finder information Off
-----------------------------------------------------------------
Extended attributes not supported by filesystem at /mnt/rnbackup/general/rdiff-backup-data/rdiff-backup.tmp.0
Unable to import win32security module. Windows ACLs
not supported by filesystem at /mnt/rnbackup/general/rdiff-backup-data/rdiff-backup.tmp.0
escape_dos_devices not required by filesystem at /mnt/rnbackup/general/rdiff-backup-data/rdiff-backup.tmp.0
-----------------------------------------------------------------
Detected abilities for destination (read/write) file system:
Ownership changing Off
Hard linking On
fsync() directories On
Directory inc permissions On
High-bit permissions On
Symlink permissions Off
Extended filenames On
Windows reserved filenames Off
Access control lists On
Extended attributes Off
Windows access control lists Off
Case sensitivity On
Escape DOS devices Off
Escape trailing spaces Off
Mac Fatal Error: Fatal Error: The file specification
''/shares/general/**'
cannot match any files in the base directory
'/shares/general'
Useful file specifications begin with the base directory or some
pattern (such as '**') which matches the base directory.
OS X style resource forks Off
Mac OS X Finder information Off
-----------------------------------------------------------------
Backup: must_escape_dos_devices = 0

-------------------------------
Backup completed at Sun 24 Jan 21:23:02 GMT 2016
p.s. keep getting a web page error saying this whole reponse is only 3 characters long?!

rknichols 01-24-2016 05:29 PM

Total mystery. I have no idea where it's getting that "/shares/general/**" from. I can paste that command line into a shell, and it runs just fine. Only difference is that my target filesystem does support Posix ACLs and extended attributes, but that shouldn't matter.

The web page error is because you're misusing the [QUOTE] tag. That's for including text from previous posts, not for your own material, so the program thinks you're not adding any new content. Use [CODE] ... [/CODE] tags instead, which also will preserve formatting.


All times are GMT -5. The time now is 06:25 AM.