LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-24-2016, 03:03 PM   #1
pointer2null
Member
 
Registered: Mar 2012
Location: Bristol, UK
Distribution: CentOS, Debian
Posts: 32

Rep: Reputation: Disabled
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?
 
Old 01-24-2016, 03:17 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
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.
 
Old 01-24-2016, 03:26 PM   #3
pointer2null
Member
 
Registered: Mar 2012
Location: Bristol, UK
Distribution: CentOS, Debian
Posts: 32

Original Poster
Rep: Reputation: Disabled
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?!
 
Old 01-24-2016, 05:29 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rdiff-backup syntax MsFinni Linux - Newbie 4 01-24-2016 10:49 PM
Query regarding rdiff-backup! mangatmodi Linux - Software 1 12-01-2011 01:02 PM
[SOLVED] script to exclude words from a lists packets Programming 5 06-16-2010 09:40 PM
Backup system ala rdiff-backup, but without mirror and with dst encryption dr_dex Linux - Software 0 08-04-2008 03:39 AM
rdiff-backup problem dave`2005 Linux - Software 0 03-19-2006 03:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration