Discussion:
rsync + ssh -o -p -g -l
(too old to reply)
michael mendoza
2005-03-01 04:51:32 UTC
Permalink
Hi, i need move 20 GB of data from a old computer to a
new server and I need than the permiss of user, group,
other and symlink be the same in the new server.

Y try with

rsync -avzpogl -e ssh archivoOrigen
***@ipDestion:/dir2/ but when a see in the new
server, the data dont have the same permiss of owner,
group than the old server.

How i can to have the same permiss?

Note: I dont write so much english..

_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com
Wayne Davison
2005-03-01 06:13:33 UTC
Permalink
but when a see in the new server, the data dont have the same permiss
of owner, group than the old server.
The problem is that rsync need to be running as root in order to create
a file with different ownership than the login user. So, you either
need to allow root to login via ssh and run rsync:

rsync -avzpogl -e ssh archivoOrigen ***@ipDestion:/dir2/

Or, you need to pull the files as root from ipDestion, like this:

ssh -l usuario ipDestion
su
rsync -avzpogl -e ssh ***@ipSource:/path/archivoOrigen /dir2/

As long as usuario has permissions to read the files, the latter command
will work fine (and root will be writing the files, so they will get
their ownership set correctly).

One other thing to keep in mind: to preserve groups between machines,
you need to ensure that the /etc/group file has all the needed groups in
it on the destination machine or rsync will fall back to using the group
number without translation (which can sometimes cause a mismatch).

..wayne..
michael mendoza
2005-03-03 12:57:13 UTC
Permalink
Nota: Se adjuntó el mensaje reenviado.

_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com
John Van Essen
2005-03-05 09:38:31 UTC
Permalink
(Email attachment quoted for the benefit of the mail archive...)
Hi, thank again.
I used rsync today to copy 400 MB from a pc to other
pc with rsync -avz -e ssh SourceDir
but in the source pc i write in the directory which i
want copy: du -sh and i have 400 Mb but when i use
rsync to copy to the other pc, and there i write du
-sh i see than have 450 MB , is it normal?
Example: pc A(source)
#cd /home/mike/
# du -sh
# 400 MB
pc B(destination)
#cd /home/mike/ (or any dir destination)
#du -sh
# 450 Mb
Why? what that mean?
Possibilities:

1) There was something already in the destination tree. Since you are
not using --delete, there could be more files in the destination.

2) There are hard links in the source tree. Since you are not using
-H, they are now separate files at the destination. But this
scenario is unlikely - hardlinks aren't used by the typical user.

3) The atomic unit of storage is larger at the destination (e.g. 4096)
that at the source (e.g. 2048). So unused space would be greater.
But a 50 MB difference would require tens of thousands of files.

You should get directory tree listings (ls -lR) and compare them to
see what's going on.
How can see with rsync more details of the transfers ,
y try to use rsync -avvz but is the = rsync -avz, i
want see more details, how can i do?
They shouldn't be the same...

Using more v's is the right thing to do. If two v's doesn't give
enough detail, try three v's.
--
John Van Essen Univ of Minn. Alumnus <***@umn.edu>
michael mendoza
2005-03-06 16:45:01 UTC
Permalink
Hi, i don't write so much englisk, look at this>


~in the same line
#rsync -avz --stats -e ssh desc ~
~***@200.109.51.119:/home/mike/Desktop/
Password:
building file list ... done
desc/
desc/prueba/
desc/prueba/a
desc/prueba/b
desc/prueba/p/
desc/prueba/p/c
desc/prueba1.tar

Number of files: 7
Number of files transferred: 4
Total file size: 10240 bytes
Total transferred file size: 10240 bytes
Literal data: 10240 bytes
Matched data: 0 bytes
File list size: 149
Total bytes sent: 479
Total bytes received: 100

sent 479 bytes received 100 bytes 128.67 bytes/sec
total size is 10240 speedup is 17.69
[***@tyto4 mike]# cd desc/
[***@tyto4 desc]# du -sh
52K .

now, in the host destination look at:

machine:/home/mike/Desktop# cd desc/
machine:/home/mike/Desktop/desc# du -sh
24K .


I don't understeint that, why? in the source is 52 k
and in the destination is 24k
Post by John Van Essen
(Email attachment quoted for the benefit of the mail
archive...)
On Thu, 3 Mar 2005, michael mendoza
Hi, thank again.
I used rsync today to copy 400 MB from a pc to
other
pc with rsync -avz -e ssh SourceDir
but in the source pc i write in the directory
which i
want copy: du -sh and i have 400 Mb but when i
use
rsync to copy to the other pc, and there i write
du
-sh i see than have 450 MB , is it normal?
Example: pc A(source)
#cd /home/mike/
# du -sh
# 400 MB
pc B(destination)
#cd /home/mike/ (or any dir
destination)
#du -sh
# 450 Mb
Why? what that mean?
1) There was something already in the destination
tree. Since you are
not using --delete, there could be more files in
the destination.
2) There are hard links in the source tree. Since
you are not using
-H, they are now separate files at the
destination. But this
scenario is unlikely - hardlinks aren't used by
the typical user.
3) The atomic unit of storage is larger at the
destination (e.g. 4096)
that at the source (e.g. 2048). So unused space
would be greater.
But a 50 MB difference would require tens of
thousands of files.
You should get directory tree listings (ls -lR) and
compare them to
see what's going on.
How can see with rsync more details of the
transfers ,
y try to use rsync -avvz but is the = rsync
-avz, i
want see more details, how can i do?
They shouldn't be the same...
Using more v's is the right thing to do. If two v's
doesn't give
enough detail, try three v's.
--
John Van Essen Univ of Minn. Alumnus
_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com
Wayne Davison
2005-03-06 18:20:26 UTC
Permalink
Post by michael mendoza
52K .
machine:/home/mike/Desktop/desc# du -sh
24K .
I don't understeint that, why? in the source is 52 k
and in the destination is 24k
John mentioned the various things that can differ between systems.
Remember that "du" shows the whole amount of disk space used for a
file, including any wasted space, so it's easy for the numbers to be
different, especially if the file systems are of a different kind
(e.g. one is ext3 and the other is Reiser3). So, it's probable that
the block-size is larger on the destination system. If you run a
directory listing of both "dest" dirs ("ls -l dest") and the files
and sizes match, that is definitely the source of the discrepancy.

..wayne..

Continue reading on narkive:
Loading...