On Tuesday 13 August 2013 09:49 PM, Justin T Pryzby wrote:
On Tue, Aug 13, 2013 at 09:43:06PM +0530, Sherin A wrote:
If linux user foo , with home /home/foo , what ownership we need
to give the files under his home folder , it must be "foo" and not
root.
Why? The user created the hardlink themselves, and it had root
ownership, why should the backup/restore lose that information? Are
you manually chowning the files after restore? That's prolly also
losing timestamp information by doing that.
After Rsync it will be as follows,
rsync -H preserves hardinks, otherwise it doesn't.
root@cptest [~]# find /home/dom2inho/ -type f -links +1 => He have
hard link in home
/home/dom2inho/shadow
root@cptest [~]# find /backup/dom2inho -type f -links +1 => There
is no hard link in backp
root@cptest [~]#
You should also do find /etc/ -type f -links +1.
Justin
I am doing rsync from root@10.0.0.10/home/foo to
storageuser@10.0.0.20/home/storageuser/dailybackup/foo over ssh (no
role for -H) , so the storage files must be under the ownership of
storageuser and not the original owner , so we have to change the
ownership of files too "foo" after the restore , otherwise the user foo
can't access his files . So changing ownership is not that problem , if
we can identify which is the HL file . Otherwise we have to say , rsync
only need to use in same server itself with different partition
schemes for each directories and having kernel 3.6+ or higher ?
PS : if any one interested in making a patch with an additional option
for rsync for excluding hardlinks with -links +1 links , please help
me , it is easy to check the file with an lstat / stat system call.
Or is it possible to get a developer documentation for rsync with the
detailed info ?
Thanks to every one
--
--------------------------------------
Regards
Sherin A
http://www.sherin.co.in/
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html