![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to copy owner permissions to group | ynixon | UNIX for Dummies Questions & Answers | 4 | 09-04-2008 11:29 AM |
| How to set the name of the group and the owner while creation of the file? | nehak | UNIX for Dummies Questions & Answers | 2 | 04-23-2008 09:26 AM |
| permission, owner and group | pascalbout | Shell Programming and Scripting | 2 | 01-14-2006 11:47 AM |
| Can't change owner and group of a linux file | bache_gowda | UNIX for Dummies Questions & Answers | 7 | 06-26-2003 11:08 PM |
| owner and group in Linux | lapnguyen | UNIX for Dummies Questions & Answers | 1 | 07-16-2002 11:55 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Rsync - Preserve owner/group with different UID/GID
Dear Folks :-) I want to rsync some files between some servers and preserve files owner and group (not UID or GID), in some machines UID and GID are differents, for example: a) In the rsync server: Code:
# stat vbseo.php File: `vbseo.php' Size: 26758 Blocks: 56 IO Block: 4096 regular file Device: 804h/2052d Inode: 21971712 Links: 1 Access: (0644/-rw-r--r--) Uid: (10002/ user1) Gid: (10001/ psacln) Access: 2006-10-09 18:30:59.000000000 +0200 Modify: 2006-10-09 19:12:48.000000000 +0200 Change: 2006-10-09 19:12:48.000000000 +0200 # grep psacln /etc/group psacln:x:10001: b) In the rsync clients: Code:
# stat vbseo.php File: `vbseo.php' Size: 26758 Blocks: 56 IO Block: 4096 regular file Device: 803h/2051d Inode: 37421492 Links: 1 Access: (0644/-rw-r--r--) Uid: (10002/ user1) Gid: (10001/ UNKNOWN) Access: 2007-11-30 10:46:59.000000000 +0100 Modify: 2006-10-09 19:12:48.000000000 +0200 Change: 2007-11-30 10:46:59.000000000 +0100 # grep psacln /etc/group psacln:x:2524: In the case of UID/GID are the same between machines there isn't problems.. but when don't match there are problems. I have tried several rsync options like "--owner", "--group", "--numeric-ids", "--super", etc.. but getting the same result.. is there anyway to make this with rsync? I have a similar solution with tar+ssh but I want to use Rsync: Code:
tar cpzf - /source --ignore-failed-read --ignore-zeros | ssh root@192.168.x.x -p22 "cd /destination; tar --same-owner -xzf -" Regards, -- Santi Saez |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|