rsync transferring files between two servers

SabSchap

New Member
Joined
Dec 9, 2020
Messages
1
Reaction score
0
Credits
18
Hallo, ich bin Newbie und habe mit rsync bisher noch nichts zu tun gehabt. Folgende Situation:
Ich habe bei Hosting Unternehmen A einen Server A (Centos 7, Nextcloud installiert). Bei Hosting Unternehmen B haben wir nun Server B (ebenfalls CentOS 7, Nextcloud installiert). Auf Server A liegt unserer aktuelle Nextcloud, die im Einsatz ist. Diese soll rüber wandern auf Server B. Habe nun gedacht, dass das mit rsync funktionieren könnte. Jetzt komme ich aber nicht richtig klar mit den rsync Befehlen. Vielleicht könnte ihr mir helfen.

Die Nextcloud Dateien liegen auf dem Server A unter /var/www/kd/aaaaa.xxxxxx.com/
Die IP wäre z.B. aa.aaa.aaa.aaa

Auf Server B (wo die "alten" Dateien hin kopiert werden sollen) liegen die Dateien, wenn ich ins Plesk Dahsboard gehe im Basisverzeichnis unter der Domain bbb.bbb.de

Wie bekomme ich jetzt die Dateien von Server A auf B?
Und muss ich die Nextcloud Dateien auf Server B vorher löschen?

Vielen, vielen Dank im Voraus!
 


For the benefit of the readers, I have translated the title to English, and moved this to General Server.

The Post reads:

Hello, I'm a newbie and I haven't had anything to do with rsync yet. Following situation:
I have a server A (Centos 7, Nextcloud) installed at hosting company A. At hosting company B we now have server B (also CentOS 7, Nextcloud installed). Our current Nextcloud, which is in use, is on server A. This should migrate over to server B. I now thought that this could work with rsync. But now I can't really handle the rsync commands. Maybe you could help me.

The Nextcloud files are on server A at /var/www/kd/aaaaa.xxxxxx.com/
The IP would be e.g. aa.aaa.aaa.aaa

When I go to the Plesk Dahsboard, the files are on server B (where the "old" files are to be copied) in the base directory under the domain bbb.bbb.de

How do I get the files from server A to B now?
And do I have to delete the Nextcloud files on Server B beforehand?

Many, many thanks in advance!

@SabSchap welcome to linux.org.

Please post in English, we do not have the resources to translate back and forth.

Good luck

Chris Turner
wizardfromoz
 
@SabSchap rsync is a great tool to get files from here to there (or there to here!).

I'll usually run it with these flags:

Copying a directory, here to there:
rsync -avz --progress /path/to/directory/ user@server:/path/to/place/it/

Copying a directory, there to here:
rsync -avz --progress user@server:/path/to/directory/ /path/to/place/it/

Copying a single file is identical, just use the path to the filename.

Flags:
a: archive mode
v: verbose
z: compress during transfer
--progress: will show a progress bar

Hope this helps!

Rob
 

Staff online

Members online


Top