Re: how to get rsync+cp-rl to preserve permissions in all snapshots.



Rahul <nospam@xxxxxxxxxxxxxx> wrote in
news:Xns9C1EA2A5D97066650A1FC0D7811DDBC81@xxxxxxxxxxxxxx:

One big problem: Permisions.

I find that all snapshots I create by cp -rl change to the permissions
seen by the last rsync. That is bad. [My diagnosis: When rsync detects
a permission change it is not unlinking and relinking as it ought to.]


In case this description isn't clear:

original>touch t
-rw-r----- 1 foo users 0 Jun 2 15:36 t

backup>rsync -av --delete ../sender/ snapshot1; cp -rl snapshot1
snapshot2
backup>ls snapshot1/t
-rw-r----- 1 foo users 0 Jun 2 15:36 t
backup>ls snapshot2/t
-rw-r----- 1 foo users 0 Jun 2 15:36 t

original>chmod a+r t
-rw-r--r-- 1 foo users 0 Jun 2 15:41 t

backup>rsync -av --delete ../sender/ snapshot2; cp -rl snapshot2
snapshot3
backup>ls snapshot1/t
-rw-r--r-- 1 foo users 0 Jun 2 15:41 t
backup>ls snapshot2/t
-rw-r--r-- 1 foo users 0 Jun 2 15:41 t
backup>ls snapshot3/t
-rw-r--r-- 1 foo users 0 Jun 2 15:41 t

I would have preferred snapshot1 to retain the old permissions:
-rw-r----- and not change to "-rw-r--r--"





--
Rahul
.