SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Excluding special files, but not symlinks
Author Message
Post Excluding special files, but not symlinks 
Hi Ben,

The option to exclude special files is very useful. However, I would
prefer that it not exclude symbolic links, only sockets, devices, and
fifos. I personally don't consider a symlink to be a "special" file,
and I often want to backup these links (but not all the sockets and
other special files). There is no easy way to do this with the current
options.

So to solve the problem I made a small patch that adds an
"--exclude-special-non-link-files" option to do this. I don't know if
this is the best approach, but it's at least a compatible approach for
existing users. I would prefer that the "--exclude-special-files"
option not exclude symlinks, and that there be a new option for
excluding just symlinks, but that would change behavior for existing
users expecting the symlinks to not be backed up. You can decide how to
properly address this. If you want a patch that changes is that way, I
can send one.

Take it for what it's worth, but it's useful to me at least, and maybe
to others.

Thanks!
-Robert

Post Excluding special files, but not symlinks 
Hi Ben,

Here is a patch that does what I prefer the behavior of rdiff-backup to
be regarding the --exclude-special-files option. You can disregard the
previous patch.

This patch adds "--exclude-symlinks", "--exclude-sockets", and
"--exclude-fifos" options and the "--exclude-special-files" works as it
did before (excludes dev files, fifos, sockets, and symlinks). I also
updated the man page to reflect these changes. This way you can
selectively use any combination of them, or the shorthand
"--exclude-special-files" option for all of them. This patch is also
backward compatible with existing rdiff-backup implementations by
users.

It does issue those warnings about not being the first selector when
you use multiple of these at the beginning. I haven't fixed that yet.
But they don't hurt anything.

I think this is the cleaner solution IMHO. But it's your call since
you're the author. ;)

Thanks!
-Robert

Post Excluding special files, but not symlinks 
Hi Ben,

Me again. Attached is a more robust patch that includes fixes to
properly issue the warning messages about not using the special file
excludes first. I also altered the options a little bit to be more
consistent with the naming used in the other options. The options are
now:

--exclude-fifo-files
--exclude-socket-files
--exclude-symbolic-links

Let me know what you think!

Thanks!
-Robert

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB