Setting up the Plesk Backup Manager on a 1&1 Linux Root Server

On a server I have to administrate, I had some problems to set up the Backup Manager through the Plesk Panel. So I decided to write a small tutorial on how to set up the Backup Manager on a 1&1 Dedicated Server Linux. But it might the the same on many other servers as well.

The 1&1 Server uses Plesk version 9.2. The first step is to logon to the Plesk Panel. On the “Home” page you should find a button for the Backup Manager in the Server section:

Backup Manager

After selecting the Backup Manager you will see some tools. The “Refresh” function is self-explanatory. But I will give you a quick overview over the other tools.

Backup-Manager-Tools

With the tool “Back up” you can create a single Backup which will be executed immediately. The “Scheduled Backup Settings” option allows you to set up a daily (or a weekly, monthly) backup. The “Upload Files to Server Repository” option is used to copy backups back to the server to use them for recovery. But we first take a look at the “Personal FTP Repository Settings” option:

Personal-FTP-Repository-Settings

In this form you have to enter the login data from your 1&1 Recovery Server. You’ll find these information in the 1&1 Control-Center in the “Server-Backup” option in the “Server-Verwaltung” (server management) section. You might not be able to access this FTP server from your local machine, so don’t mind that. The access to the FTP server from your web server will work thorugh the 1&1 network. After entering the data and saving the settings with a click on “OK” you will get back to the “Backup-Manager” menu. Here you choose “Scheduled Backup Settings”:

Scheduled-Backup-Settings

It’s very important to choose “Personal FTP repository” to save the data on the FTP backup server so your backups don’t get lost if your 1&1 ROOT server crashes. It depends on you when to start the backup but you should choose a time if less visitors. So if your server is in europe but you have many visitors from the US, 1am isn’t a good time as. In this case you should choose something like 6am where users from the US go to sleep and europeans just get up. The process doesn’t need a lot of ressources but choosing the right time, you get a backup with the data of a whole “day”. You can also set a prefix if you like to. But you should enter an e-mail address to get messages about failed backups. At last you must choose the “Server configuration and content” because otherwise you wouldn’t backup the files on your server.

UPDATE: You should also consider to limit the number of backups to a reasonable value. Why this is important you can read in this post: Limit the number of backups in the Plesk backup manager.

Now it seems like we are done. But unfortunately we are not. The default setting of Plesk will save the backups in the “/var/lib/psa/dumps” folder which is located on the “/dev/sda6” partition. This partition is often too small for a backup file. The backup is stored in this folder before it will be moved to the FTP server after completing the backup process. As the MySQL tables are also stored on this partition, you’ll get in real trouble as soon as the backup fills up the whole partition. The MySQL databases will then have no space left to create temporary tables for thier queries and this will cause the MySQL server to deny huge queries. So you have to move the backup folder. You should move it to the largest partition on your disk. To find out which one is the largest, you can use the “df” command (the addidtional paramerters are only for visibility), after you logged on using SSH:

s12345678:~ # df -h -x tmpfs
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             9.2G  235M  8.5G   3% /
/dev/sda5             9.4G  2.2G  7.3G  23% /usr
/dev/sda6             9.4G  1.9G  7.5G  20% /var
/dev/sda7             436G   21G  416G   5% /srv

In this example the largest partition ist “/dev/sda7” on which the “/srv” folder is mounted. You move the folder using this three commands:

mv /var/lib/psa/dumps /srv/dumps
rm -rf /var/lib/psa/dumps
ln -s /srv/dumps /var/lib/psa/dumps

The first command moves the folder to “/srv” which is in this example on the largest partition because the webspace files are also in this folder. The second command deletes the folder on it’s old place (if it’s still there). The most important one is the third command. It creates a so-called “symbolic link” to the new folder. Using this symbolic link, you don’t have to change the plesk config which isn’t possible trough the Plesk Panel anyways.

After this steps you just have to wait until your first backup time is reached. The backup process may take half and hour or even more. To test your settings you may simply create a single backup with the configuration only using the “Back up” option. After the backup has been created sucessfully you should be able to see them listed on the “Personal FTP Repository” tab:

Backup-Manager-created-backups

On this tab you can also use a backup for recovery. But thankfully I didn’t need to do that, yet. But as soon as I had to do that (hopefully never) I will post about it.

I hope this post could have helped you on setting up a backup routine. But it’s a pity that 1&1 doesn’t configure their servers correctly and choose the largest partition for the backup data. If you have another tip to this topic or if you have any questions or suggestions I would be happy about some comments.

Posted by

Bernhard is a full time web developer who likes to write WordPress plugins in his free time and is an active member of the WP Meetups in Berlin and Potsdam.

25 comments » Write a comment

  1. Thanks for taking the time to create this tutorial! I am setting up a server at 1&1 and could not locate their documentation for doing this.

  2. I have a 1&1 Root Server also with Plesk and mine has the directories for backup set to the /dev/md7 partition which is the largest part. So I have not moved mine but in watching the backups run I can not see that the temp files are being created in this directory before being uploaded to FTP. I am sure that I am missing something.

    • Could you find out, where the backup files are stored? The folder which I explained to move is called “dump” and therefore I think it is only used for temporary storing the backup before moving it to the FTP. Are you sure you had set up the Backup Manager to store the backups on the FTP repository. Or are they stored on your server? Just check out the “Server Repository” and the “Personal FTP Repository” (last screenshot) tab in the Backup Manager menu.

  3. Automatische Plesk Dumps werden im Ordner gespeichert, der durch den Variablenwert DUMP_D in der Datei /etc/psa/psa.conf definiert ist.

    dann sparrt man sich die ganzen Verzeichniss Verlinkungen und rumkopierereien 😉

    • Danke für diesen in der Tat sehr viel einfacheren Lösungungsweg. Meine Bedenken dabei wären nur, dass diese Einstellung bei einer Änderung innerhalb des Backup-Managers wieder überschrieben wird oder bei einem Update des selbigen. Hast du das bei dir selbst schon einmal getestet?

  4. The backups are stored here ‘/var/lib/psa/dumps’ but I can’t for the life of me get a decent sized back to save on ftp server reository then bring it back again, it fails every time.

    • I must say, that I never had to restore one of my backups. How large are your backup files and how large is your FTP server repository? I get something around 20-30GB per backup.

  5. nach einem Ausfall mit meinem 1&1 Rootserver waren bei mir leider alle Daten weg. Ich hatte die Einstellung “Persönlichers FTP-Repository” nicht beachtet *grummel* Aber aus Fehlern lernt man

    • Ist dan nicht immer so? Man denk das Backup ist sicher und merkt dann erst im Fehlerfall, was man falsch gemacht hat. Ich musste zum Glück noch nie ein Backup wieder einspielen. Oder vielleicht auch leider noch nie, denn wer weiß, ob es am Ende auch klappt. Daher sichere ich auch alle Dateien täglich per FTP auf ein lokales Backup. Ich habe neben dem ROOT Server noch einen V-Server und werde dort mal testen ein Backup wieder herzustellen (sobald dort das Plesk endlich richtig läuft). Schade, dass du meinen Artikel erst jetzt gelesen hast, aber vielen Dank für den Kommentar.

  6. Hallo,

    hat jemand Erfahrung damit, große BackUp-Dateien (ca. 20GB) vom 1&1 BackupServer zurück ins Server-Repository zu kopieren? Ich bekomme immer einen FTP-Fehler. Ich nutze zur Zeit Plesk p.5.2 auf Suse 11.

    Vorab schon mal herzlichen Dank für Tipps.

    Uwe

      • Ich habe leider (oder sollte ich sagen zum Glück) noch nie ein Backup zurück kopieren und einspielen müssen. Ich würde dir raten mal den 1&1 Support zu befragen. Die sind in der Regel recht kompetent, was das angeht.

    • Hallo,

      ich habe nun (leider) reichlich Erfahrung mit dem Einspielen eines BackUps sammeln dürfen. Um das von mir geschilderte Problem zu umgehen, sollte man unbedingt ein Häckchen setzen bei “Backup über mehrere Datenträger erstellen”. Die Standardgröße von 2047 MB kann man stehen lassen.

      Viele Grüße
      Uwe

      • Hallo Uwe,

        danke für den Tipp. Habe das jetzt bei mir auch mal eingestellt um es zu testen. Was genau ändert sich dadurch denn und warum sollte man es unbedingt tun? Wo hast du die Info erfahren? Würde eventuell den Artikel aktualisieren, wenn es wichtig ist.

  7. Das ist deswegen wichtig, weil viele Anbieter Ihre FTP Uploads begrenzen. Außerdem macht es ein Unterschied, ob ich 30 GB in einem Rutsch hochlade, und er plötzlich nen Fehler hat und ich von Vorne anfange, oder wenn es nur bei einem der 15 – 2 GB Dateien passiert. Wer nur ein normalen DSL Upload hat kommt auch schnell in die 24Stunden Disconnect Zeit rein. Eine hölle wenn man eine 30GB Datei hochladen muss… 😉
    Was nützen einen die tollsten Backups, wenn Ich sie gar nicht wieder hochladen kann…

  8. Die Backups die auf /var/lib/psa/dumps zwischengespeichert werden, die werden dann automatisch auf den ftp backup server verschoben? und vom webserver gelöscht?

    • Falls du als Backup-Ziel das “persönliche FTP-Repository” ausgewählt hast, dann ja. Es wird immer erst das Backup komplett lokal erzeugt, anschließend auf den FTP hochgeladen und dann lokal gelöscht.

  9. Gibt es dann auch eine Möglichkeit die Backups direkt auf das ftp repository zu speichern? Ohne dem Zwischenspeichern auf dem Webserver…

    Danke schonmal!

    • Ich bin leider kein Experte was Plesk angeht. Ich denke nicht, dass man das ändern kann. Was aber eventuell funktionieren würde wäre ein “symbolic link” direkt auf einen FTP-Server. Ob und wie das mit deinem Server funktioniert kann ich aber leider auch nicht sagen, da meine Linux-Kenntnisse recht begrenzt sind. Ich würde mich aber einfach mal mit dieser Frage an ein Linux-Forum wenden.

  10. Hallo,
    danke für die tolle Anleitung.

    Eine Frage noch: Wie kann ich ein geplantes Backup nachträglich ändern, also z. B. von 2 auf 6 Uhr verschieben?
    Oder wie kann ich es löschen?

    Danke und viele Grüße
    Caeppi

    • Hallo Caeppi,

      im Punkt “Einstellungen für geplantes Backup” kannst du selbstverständlich jederzeit die Startzeit ändern. Löschen kannst du die Einstellungen nicht komplett, aber du kannst sie einfach über die Checkbox “Diese Aufgabe aktivieren” wieder deaktiveren.

      Gruß
      Bernhard

      • Hallo,
        leider klappt das nicht, wenn ich auf den Punkt gehe, sieht die Maske so aus, als solle ich ein neues Backup anlegen.
        Es laufen aber definitiv 3 Jobs, das sehe ich im FTP-Reposotory.
        Als was muss ich eingeloggt sein?
        Ich bin als Admin drin und gehe über Serververwaltung, Tools und Dienstprogramme, Backup manager, ist das richtig?
        Caeppi

        • Ich vermute folgendes: Bei Plesk gibt es die Maske zum Einrichten eines geplanten Backups einmal direkt auf der Hauptseite, also für den gesamten Server und zusätzlich pro Domain. Du hast vermutlich bei einer einzelnen Domain ein Backup eingestellt und nicht für den ganzen Server (oder umgekehrt).

          Ich habe leider kein Plesk mehr in der beschriebenen Version installiert. Sollte das noch immer nicht die Lösung sein, muss ich dich wohl leider an das Support-Forum von Plesk verweisen.

          Aber versuche es erst einmal mit dem Tipp. Das war bei mit früher auch mal der Fehler.

Leave a Reply

Your email address will not be published. Required fields are marked *