Server upgrade of the newe server

In this context I have a server move at the same hoster internally! So I have access to the old server as well as to the new one. I have now installed myself on the new Youno Host on it. Everything worked out wonderfully.

But now I wanted to move my old system to the new server, as shown in the second screen. ![graphics|690x455]

(upload://jTEki6kK87s9hUjALZEt1ru6pqJ.png) should therefore be completely on the new stand. I figured I could just upload it back to the backup–archive on the new server. But unfortunately the way I had done it more often was no longer possible. I hope no one takes offense at me for struggling into the tweet like this. That should have similar problems nightly according to my understanding now and according to my translation. Thank you for your understanding https://docs.hetzner.com/de/robot/storage-box/access/access-ssh-rsync-borg

Good that the new installation worked :slight_smile:

So,

  • screenshot 1 is on the old server
  • screenshot 2 is on the new server

Is that correct?

Now, what is in the backup on the new server in the second screenshot (the one saying “Vor etwa 3 Stunden”)? Does it have the contents that are in the first screenshot?

yes, one screen shot has 276 GB of data and the other one is blank and the one that is blank sool all gone. But how do I get all this there?

ja, ein Bildschirm Sreenshot hat 276 GB Daten und der andere ist leer und der der leer ist sool alles hin. Nur wie bekomme ich das alles dahin?

I can’t find 276 GB in either of the screenshots. What is inside the ‘vor etwa 3 Stunden’ archive, the one ending in …103943.tar at the bottom of the second screenshot?

1 Like


aim lBildschirmfoto zu 2022-03-08 08-35-16 look her

So, is that screenshot (and the backup) on the new server?

Or is moving the backup from old server to new server the problem?

Sorry, I don’t get it :wink:

1 Like

That’s exactly the problem I have to get all the data down and pack it on the new server. I still have both at the moment. But at the end of the month the old one will be switched off. The problem is that I don’t know where to find the data to get it from server A to B via terminal. Someone here kindly gave me two links from Yunohost. Where I read it myself, but didn’t understand it. Didn’t read well conveyed in German. Unfortunately I haven’t found anything specific here yet. That’s two years’ work. Which would then be gone. I only have internet here with a mobile phone card and am trying to download all the data right now, but I haven’t found anything myself yet how to upload them via terminal.

Ah, I see. Lets try to get some structure:

  • old server = A
    • A got a backupA of 271 GB on 20220116
    • A has user adminA that has ssh-access
    • A will be shut down on March 31
    • A is: at home and will be sold / at a VPS / at another place that will close at the end of the month?
  • new server = B
    • B got a new, empty Yunohost installation
    • B got user adminB that has ssh-access
    • B is: at home / at a VPS / somewhere else
  • Internet connection between the two is via mobile internet / 4G connection? Does the backup have to be downloaded that way, or only SSH commands via 4G ?

You want to move backupA from A to B, and then restore it there, so that you don’t lose your two years of work on the server.

The easiest way is to do the restore of backupA on B instead of yunohost postinstall. If you already did the postinstall, you can still restore the backup. Warning: it only works if you did not create users and/or installed software etc on B.

The backups are in /home/yunohost.backup/archives, and exist of duo’s of the backup.tar itself and backup.info.json metadata. You need to copy both!

So, onto the work itself. I imagine you start working on your desktop, and then jump from system to system this way:

$ carrabelloy@desktop:~$ ssh admin@serverA
password etc
$ admin@serverA:~$ # check that the backup is there
$ admin@serverA:~$ ls /home/yunohost.backup/archives/
...
..20220116.tar
..20220116.info.json
... 
$ admin@serverA:~$ # ok, it is there
$ admin@serverA:~$ # now go to B
$ admin@serverA:~$  ssh admin@serverB
password etc 
$ admin@serverB:~$ # lets check that the backup location is available
$ admin@serverB:~$ ls /home/yunohost.backup/
archives 
$ admin@serverB:~$ # OK, it is there. 
$ admin@serverB:~$ # Check that we are allowed to write here
$ admin@serverB:~$ cd /home/yunohost.backup/archives
$ admin@serverB:/home/yunohost.backup/archives $ getfacl .
# file: .
# owner: admin
# group: root
user::rwx
group::r-x
other::---

$ admin@serverB:/home/yunohost.backup/archives $ # yes, admin is owner, and is allowed to write. Lets get the archive
$ admin@serverB:/home/yunohost.backup/archives $ scp admin@serverA:/home/yunohost.backup/archives/20220116.* . 
... wait a while ...
$ admin@serverB:/home/yunohost.backup/archives $ ls -ahls 
 20k 20220116....info.json
271G 20220116....info.json
$ admin@serverB:/home/yunohost.backup/archives $ sudo yunohost backup list 
  - ... 
  - ... 
  - 20220116-....
  - ... 

$ admin@serverB:/home/yunohost.backup/archives $ # looks good, you could restore now
$ admin@serverB:/home/yunohost.backup/archives $ sudo yunohost backup restore 20220116-.... 

That is how I speculate things would go. There are a few if’s and but’s:

  • It is easier if you got backupA-system and backupA-apps split, so that you can first restore domains and users, and then restore the apps.
  • The list above is how I imagine it would work, but if you get stuck, please copy the whole list of commands as text, not only a screenshot of a small part of your terminal client
  • If your internet connection is stable enough, you could mount the archives-directory via SSHFS, and not copy the backup before restoring
  • If your internet connection is not stable enough: are you familiar with screen or tmux command line apps? They are very helpful to continue after a dropped connection
  • Please give some insight in the situation, where the servers are (at home, VPS, etc) and whether you got enough free space or that it maybe is running out.
  • I think you can just copy/paste the commands above, and replace serverA and serverB with your domains/IP’s; just be sure to read what it is doing in case I made a mistake.

Good luck!

1 Like

Thank you for the great information. that you left here. On the one hand, LTE % should run here, but the provider can’t do it. I have unlimited data volume on this card.
My hoster, i.e. server provider, has increased the prices of this type, since the price of electricity has risen again in Germany. So go through the roof. So, like all old regular customers, you offered me a new server with less power consumption. Furthermore, even with more hard drive storage in the Red controller, that is twice 4 TB. The domains are distributed by other providers. Which I put on the server myself. Where my server is now, the old one will go to the new one and will be able to take up all domains DNS ec again. Because I don’t have to go there. I don’t know how I can completely just move this data from server A to server B the new one. The whole thing via SSh, because then the new one would have to get the data transferred 1 to 1, right? Am I wrong there? I have not created a user on Server B. Only Yunohost installed blank. If you have Team Viewer or Annedesk, I can even show you that if my mobile line is up to it. I am in the process of downloading the whole backup for three days now via mobile data. So far it’s close to 100 GB. Thank you for this detailed report.

Ich danke Ihnen für die tolle Information. Die Sie hier hinterlassen haben. Zum einen sollte hier LTE % laufen, doch Anbieter bekommt das nicht hin. Ich habe unlimited Datenvolumen auf dieser Karte.
Mein Hoster also Server Anbieter hat die Preise der Art hochgeschraubt, da bei uns in Deutschland der Strompreis noch mal gestiegen ist. Also durch die Decke gehen. Also haben Sie mir wie allen alten Stammkunden einen neuen Server mit weniger Stromverbrauch angeboten. Weiterhin sogar mit mehr Festplatten speicher im Red-Controller also zweimal 4 TB Die Domains sind bei anderen Anbietern verteilt. Die ich selbst auf den Server gelegt habe. Wo jetzt mein Server steht der alte kommt der neue hin und wird alle Domains DNS ec wieder aufnehmen können. Da ich da nicht ran muss. Ich weiß nicht, wie ich diese Daten von Server A komplett einfach auf Server B den neuen schieben kann. Das ganze gerne per SSh, denn dann müsste der neue doch die Daten 1 zu 1 überspielt bekommen, oder? Liege ich da verkehrt. Ich habe bei Server B keinen Benutzer angelegt. Nur Yunohost blank installiert. Wenn Sie Team Viewer oder Annedesk haben kann ich ihnen das sogar, wenn das meine Mobilleitung mitmacht zeigen. Ich bin gerade dabei oder seit drei Tagen die ganze Sicherung herunterzuladen per Mobile Daten. Bis jetzt sind es knapp an die 100 GB. Ich danke ihnen für diesen ausführlichen Bericht.

Ok, so serverA and serverB are both VPS, in a (perhaps the same) datacenter, with a good internet connection.

Yes, log in via SSH and copy the backup from A to B with scp.

Did you try following the example commands I posted? Where did you encounter a problem?

1 Like

I don’t know or didn’t understand how to do that or how exactly to proceed with the procedure as you described it.
Like here A to B with scp. But I also have what I left here now, I read the instructions from a colleague and I didn’t make any sense out of it. I think because of the translation. That’s why I haven’t gotten behind exactly how I have to use the tools at the terminal to get the cow off the ice. So I would be grateful if you could explain to me what scp actually is, since I haven’t worked with it yet. Thank you for your support in this case.

Ich weiß oder habe das nicht verstanden, wie man das macht oder wie man dazu genau vorgeht, bei dem Vorgehen wie Sie es beschrieben haben.
Wie hier A to B with scp. Doch habe ich auch was ich jetzt mal hier hinterlassen, habe von einem Kollegen dazu die Anleitung gelesen und bin nicht schlau daraus geworden. Ich denke mir wegen der Übersetzung. Daher bin ich da noch nicht genau hinter gestiegen wie ich das, was am Terminal dazu für Werkzeuge zur Anwendung bringen muss um die Kuh vom Eis zubekommen. Daher wäre ich Ihnen dankbar mir doch mal zu erklären, was das scp überhaupt ist, da ich damit eben noch nicht gearbeitet habe. Ich danke ihnen für die Unterstützung in dem Fall.

Have you read the documentation? There’s a section called “Downloading backups, from the command line” Backing up your server | Yunohost Documentation

  1. Install YunoHost on the new server, do not perform the post-installation

  2. Run the scp... command to transfer the backup.
    Since someone sent me two links here or gave me information in the forum, I unfortunately didn’t understand it. I think to myself is difficult to translate. Is that this way? What do you mean by that? Or how do you mean with the scp?
    Da hier mir jemand zwei Links gesendet hat oder im Forum an Information an die Hand gegeben hat, das habe ich leider nicht verstanden. Ich denke mir, schwer zu übersetzen ist. Ist das dieser weg? Den Sie meinen damit? Oder wie meinen Sie das mit dem scp?
    scp admin@<your.old-server-domain.tld>:/home/yunohost.backup/archives/<archive_name>.tar /home/yunohost.backup/archives/<archive_name>.tar

  3. I would advise you to make a system backup with no apps first, then restore it in the new server. It will replace the post-installation step. You can then do the same with the apps.

It is a ‘secure cp’, to copy (cp) things over an SSH connection. In the same way as you can do cp /var/log/messages /home/admin to copy a log file to the admin home directory, you could use scp admin@localhost:/var/log/messages admin@localhost:/home/admin , or another server instead of localhost.

Have you used SSH , and used the command line ? Is your desktop running Linux or another operating system? Which distro, and which program do you use for SSH?

1 Like

I am using Kaiser Linux on Debian. I only like and swear by Debian. Super community like here with some exchange. Debian runs on the latest version and desktop interface Mate

Ok, Mate provides the Mate Terminal. Do you know where to find Mate Terminal, and how to use SSH to connect to your serverA ?

1 Like

no, that’s my system at the moment what I’m working on. Unfortunately, the tpm on my thinkpad also has problems. In addition, there was almost no network for two days. I get a credit, but what’s the use if I can’t go online.

't Is an uphill battle!

Yes, so:

  • ServerA = old VPS
  • ServerB = new VPS
  • Desktop = Kaiser Linux with Mate Terminal

You would want to open the Mate Terminal, and then use SSH to connect to ServerA,

(see above)

Once your Internet is working, which step gives you a problem?

1 Like

when typing the return keys I’m on both servers
Could you please describe to me how I have to follow up exactly by termi- nation with two taps once for server a
Server B
I sometimes have the impression that my connection is having problems with an IP mask.
But otherwise I have a good connection after the second or third attempt!
Maybe you could give me the whole thing, so please document the process if you could. Maybe I’m making a mistake here. Thank you that would be very nice!

bei der eingabe der Tasten return ich bin auf beiden Servern
Könnten Sie mir das bitte mal beschreiben wie ich denn genau per Terminel Nachgehen muss bei zwei Taps einmal für Server a
Server B
Ich habe manchmal den anschein das meine Verbindung was mit IP Maske Probleme habe.
Doch sonst habe ich dann nach dem zweiten oder Dritten anlauf gute Verbindung!
Vielleicht könnten Sie mir das ganze,also den Vorgang doch bitte mal Dokomentieren wenn Sie könnten. Vielleicht mache ich hier einen Fehler. Dankeschön das wäre sehr nett!

Please copy the exact commands that you gave; you can change the hostnames/usernames. Use three backticks (`) on a new line to start a ‘code’ block, and finish that way as well.

1 Like
scp [OPTION] [user@]SRC_HOST:]file1 [user@]DEST_HOST:]file2

nach dieser seite ist zwar in Englisch dennoch moment was ich gefunden habe und etwas verstehe https://linuxize.com/post/how-to-use-scp-command-to-securely-transfer-files/

And my Debian :blush: :star_struck: and the . https://wiki.debian.org/SSHSince I’ve never done anything like this before, this is the first time for me. So I am pleased that they have contributed so far. Thank you and stay healthy

Und mein Debian :blush: :star_struck: und dazu das . SSH - Debian Wiki

Da ich sowas noch nie gemacht habe, also dieser Bereich für mich das erste mal.
So freue ich mich darüber das sie sich eingebracht haben bisher .
Dankeschön und bleiben Sie gesund