samba-bugs at samba.org
2010-Aug-18 22:15 UTC
DO NOT REPLY [Bug 7629] New: Blank filter file option to ignore whole directory
https://bugzilla.samba.org/show_bug.cgi?id=7629 Summary: Blank filter file option to ignore whole directory Product: rsync Version: 3.0.6 Platform: All OS/Version: Linux Status: NEW Severity: enhancement Priority: P3 Component: core AssignedTo: wayned at samba.org ReportedBy: sega01 at go-beyond.org QAContact: rsync-qa at samba.org Hi, I know that there are external ways to do this, but I thought it would be fastest and best as an rsync feature. I've been using rsync for a while now in some fairly advanced backup schemes and I'm extremely impressed by it. I was thinking it would be quite helpful if there were an option to ignore directories with a certain file in them, say .ignore-backup or .ignore-rsync. This would make for an easy way to avoid copying excess data, whether it be extracted source tarballs, or existing backups. I know that rsync supports filter files of a certain name, but I'd like an option where if it sees the file and it's blank, it simply skips the directory. So for example: /home/user/backup/.ignore-rsync exists and is blank, then /home/user/backup is ignored, but the it continues onto other folders. If it has filter rules in it, it can continue with processing those rules. Let me know what you think. I believe it would be a very helpful and simple feature to add. Thanks, Teran -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
Henri Shustak
2010-Aug-19 01:15 UTC
DO NOT REPLY [Bug 7629] New: Blank filter file option to ignore whole directory
> I know that there are external ways to do this, but I thought it would be > fastest and best as an rsync feature. I've been using rsync for a while now in > some fairly advanced backup schemes and I'm extremely impressed by it. I was > thinking it would be quite helpful if there were an option to ignore > directories with a certain file in them, say .ignore-backup or .ignore-rsync. > This would make for an easy way to avoid copying excess data, whether it be > extracted source tarballs, or existing backups. > > I know that rsync supports filter files of a certain name, but I'd like an > option where if it sees the file and it's blank, it simply skips the directory. > > So for example: > > /home/user/backup/.ignore-rsync exists and is blank, then /home/user/backup is > ignored, but the it continues onto other folders. If it has filter rules in it, > it can continue with processing those rules. > > Let me know what you think. I believe it would be a very helpful and simple > feature to add.An alternative approach would be to run a pre rsync script which builds your exclusion list. ------------------------------------- This message is protected by LBackup http://www.lbackup.org
samba-bugs at samba.org
2010-Aug-19 14:54 UTC
DO NOT REPLY [Bug 7629] Blank filter file option to ignore whole directory
https://bugzilla.samba.org/show_bug.cgi?id=7629 wayned at samba.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME ------- Comment #1 from wayned at samba.org 2010-08-19 09:54 CST ------- The easiest way to accomplish this is to make that signal file be name .rsync-filter, put "- *" into it, and use the -F option for the copy. Rsync will then obey any filter rules it encounters in the .rsync-filter files it finds sprinkled around in the hierarchy. This idiom will leave an empty directory, though. If you want to avoid that, you'd need to put "- /dirname" into the .rsync-filter file of the parent directory (the slash anchors the exclude in the current directory so it doesn't filter a similarly named file/dir in another directory). If you want to hide the parent-dir .rsync-fiter files, you can repeat the -F option. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.