LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   what is the rsync flag to ignore permissions (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-the-rsync-flag-to-ignore-permissions-800765/)

replica88 04-08-2010 06:19 AM

what is the rsync flag to ignore permissions
 
I am using Rsync to backup files to a another machine, the users on my fileserver do not exist on the backup server so Rsync throws errors about the permissions. It copies the files fine but I want to get rid of the errors and have Rsync ignore the permissions when backing up.

/backup is a mounted ftp directory

Below is the current command and output:
Code:

root@Fileserver:~# rsync -av --delete /shared/fileshare/ /backup/backup
building file list ... done
created directory /backup/backup
./
manager/
manager/chironfs.txt
manager/cronman.txt
manager/curlftpfs.txt
manager/curlman.txt
manager/getnetaddress.txt
manager/grepman.txt
manager/rsyncman.txt
manager/tarman.txt
public/
user1/
user10/
user2/
user3/
user4/
user5/
user6/
user7/
user8/
user9/
rsync: chown "/backup/backup/manager/.chironfs.txt.c6MbJ7" failed: Operation not                  permitted (1)
rsync: chown "/backup/backup/manager/.cronman.txt.hdBG4P" failed: Operation not                  permitted (1)
rsync: chown "/backup/backup/manager/.curlftpfs.txt.t1sG4L" failed: Operation no                t permitted (1)
rsync: chown "/backup/backup/manager/.curlman.txt.6oWPoW" failed: Operation not                  permitted (1)
rsync: chown "/backup/backup/manager/.getnetaddress.txt.V8z8Kk" failed: Operatio                n not permitted (1)
rsync: chown "/backup/backup/manager/.grepman.txt.REh4WW" failed: Operation not                  permitted (1)
rsync: chown "/backup/backup/manager/.rsyncman.txt.ho8VNM" failed: Operation not                  permitted (1)
rsync: chown "/backup/backup/manager/.tarman.txt.BkcmeS" failed: Operation not p                ermitted (1)

sent 211115 bytes  received 274 bytes  6710.76 bytes/sec
total size is 210263  speedup is 0.99
rsync error: some files could not be transferred (code 23) at main.c(977) [sende                r=2.6.9]
root@Fileserver:~#

I tried the flag to adding the no flag to -p but it still didn't work, see below:
Code:

root@Fileserver:~# rsync -av --no-p --delete /shared/fileshare/ /backup/backup
building file list ... done
./
manager/
manager/chironfs.txt
manager/cronman.txt
manager/curlftpfs.txt
manager/curlman.txt
manager/getnetaddress.txt
manager/grepman.txt
manager/rsyncman.txt
manager/tarman.txt
public/
user1/
user10/
user2/
user3/
user4/
user5/
user6/
user7/
user8/
user9/
rsync: chown "/backup/backup/manager/.chironfs.txt.6Q3eP2" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.cronman.txt.FC8Orx" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.curlftpfs.txt.mlVSN9" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.curlman.txt.vlJ4b1" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.getnetaddress.txt.LXmft0" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.grepman.txt.SVuaye" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.rsyncman.txt.KTNYqA" failed: Operation not permitted (1)
rsync: chown "/backup/backup/manager/.tarman.txt.zcU90c" failed: Operation not permitted (1)

sent 211115 bytes  received 274 bytes  7686.87 bytes/sec
total size is 210263  speedup is 0.99
rsync error: some files could not be transferred (code 23) at main.c(977) [sender=2.6.9]


evo2 04-08-2010 07:16 AM

You are using "-a" which is just shorthand for all of "-rlptgoD". By reading the man page you should be able to work out which of "-rlptgoD" to drop.

Cheers,

Evo2.

PS. it looks like ownership is the problem not permissions: Ie. what happens if you use -rlptgD instead of -a?

replica88 04-08-2010 08:01 AM

Quote:

Originally Posted by evo2 (Post 3928469)
You are using "-a" which is just shorthand for all of "-rlptgoD". By reading the man page you should be able to work out which of "-rlptgoD" to drop.

Cheers,

Evo2.

PS. it looks like ownership is the problem not permissions: Ie. what happens if you use -rlptgD instead of -a?

Of course... how silly, Thank you

for anyone who is interested, here is what im now using and details of the flags taken from the man page:
Code:

root@Fileserver:/# rsync -rltzuv --delete /shared/fileshare/ /backup/backup   
building file list ... done
./
manager/
public/
user1/
user10/
user2/
user3/
user4/
user5/
user6/
user7/
user8/
user9/

sent 383 bytes  received 98 bytes  137.43 bytes/sec
total size is 180088  speedup is 374.40

-r, --recursive recurse into directories
-l, --links copy symlinks as symlinks
-t, --times preserve modification times
-z, --compress compress file data during the transfer
-u, --update skip files that are newer on the receiver

JJJCR 04-21-2015 10:51 PM

Quote:

Originally Posted by replica88 (Post 3928504)
Of course... how silly, Thank you

for anyone who is interested, here is what im now using and details of the flags taken from the man page:
Code:

root@Fileserver:/# rsync -rltzuv --delete /shared/fileshare/ /backup/backup   
building file list ... done
./
manager/
public/
user1/
user10/
user2/
user3/
user4/
user5/
user6/
user7/
user8/
user9/

sent 383 bytes  received 98 bytes  137.43 bytes/sec
total size is 180088  speedup is 374.40

-r, --recursive recurse into directories
-l, --links copy symlinks as symlinks
-t, --times preserve modification times
-z, --compress compress file data during the transfer
-u, --update skip files that are newer on the receiver

a very old post but still helpful..

hkjz 05-01-2019 02:49 PM

Still helpful


All times are GMT -5. The time now is 09:01 AM.