![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
| Linux and Unix Error ! Redhat,suse,centos,mandrake,Free BSD,Sun |
![]() |
|
How to move all files/folder/sub folder from one server to another? resursivly
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Administrator
Posts: 18,702
Join Date: Jan 2006
Rep Power: 10
IM:
|
Once all files are moved I need some notification that its done |
|
|
|
|
|
|
|
|
#2 (permalink) |
|
Administrator
Posts: 18,702
Join Date: Jan 2006
Rep Power: 10
IM:
|
rsync --verbose --progress --stats --checksum --rsh=/usr/bin/ssh --recursive --times --perms --links /www/kunder/web/* MYHOST:www Tthe path on MYHOST is relative. If /root is on the same filesystem as /www you can just mv it. Otherwise you will probably be better off removing /root/www and starting over. A failure to preserve ownership is because you didn't tell rsync to do so. The -a option is a handy shorthand for -rlptgoD which covers most of the options you will need. rsync -avH --rsh=/usr/bin/ssh /www/kunder/web/ MYHOST:/www/kunder/web Would have been what you want. Or perhaps rsync -avH --rsh=/usr/bin/ssh /www/ MYHOST:/www --recursive --times --perms --links are part of -a along with some more options you needed. --progress If you like noise and have BIG files, ok. Me, i'm satisfied with -v. --stats Useful sometimes but not really needed, it will give you an idea of how much time rsync saves in the later rsync runs to keep things up-to-date. --checksum Not needed and slows things down considerably. If you are going to use a network filesystem just copy with cp or cpio -p. For rsync you want rsync to handle the network communications (via ssh). |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|