On Thu, Oct 12, 2006 at 12:19:14PM +0200, [EMAIL PROTECTED] wrote:
> how do you backup system files like /etc/ over ssh to another machine
> and keep permissions the same on the remote backup location ?

One possibility you can try is to use a program that lets rsync pretend
to be root, such as fakeroot or pretendroot.  I have fakeroot here that
I've used for small tasks.  For instance:

  WHO=/backup/foo
  rsync -av --rsync-path="fakeroot -s $WHO.fake -i $WHO.fake -- rsync" \
      /local/ host:$WHO/

As long as you never change the files in /backup/foo without using
fakeroot, you should be fine.  E.g. if a user on host wants to change
something in /backup/foo, they would need to run fakeroot:

  cd /backup
  fakeroot -s foo.fake -i foo.fake    # starts a shell
  cd foo
  ...
  exit

The fakeroot command stores attributes for things that can't be done the
save file (foo.fake).  It doesn't appear to be a very efficient save
file, though, so you'd need to test how well it performs.  Also, it
doesn't appear to handle simultaneous updates at all.

..wayne..
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to