Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: finchwizard on May 30, 2006, 07:48:15 AM
-
I am wanting to copy data from an old server, to a new server.
Old server A has 500 users.
New server B has 300 users.
All the users on the new server would like to have their data copied over from server A.
I have already imported all the users on the new server via Lat-tools.
I was going to use rsync to copy the data across from /home/e-smith/files/users/ to the new server.
But when I execute the command, I get all the data from /home/e-smith/files/users/ which includes users data that aren't on the new system.
What is the command to tell rsync to just update the folders that are already there, rather than copying ALL the data across.
And which server would I execute the command on.
Cheers.
James
-
finchwizard
man rsync
-
Gee thanks, I never would of thought of that. </sarcastic>
Seriously, I've read the man page for the last 2 days.
I don't ask questions unless I've really explored and tried myself.
I got it anyway, rsync doesn't quite do what I needed it to do, had to create a script.
-
finchwizard
>.... I've read the man page for the last 2 days....
Well if you told us that in your first post I would not have wasted my time.
-
I did say every time I tried.
It's all good now at least.
ls | while read dirname ; do
rsync -avz --filter='exclude .recycle' -e ssh IP_OF_OLD_SERVER:/home/e-smith/files/users/$dirname/ /home/e-smith/files/users/$dirname/
done
Just add your SSH keys so they don't ask for a password and your good.
Save that script file in /home/e-smith/files/users/ on the new server.
Just incase anyone else needs to do the same thing.