It would be great if that would be implemented.
If you backup important data, it’s good if from time to time you can test if you can restore all your data at once, without interrupting the currently running server and it’s backup processes.
But as far as I’ve meanwhile. It seems to be incredibly difficult to restore the data (so I’m really happy I’ve tested that out, and in the emergency case, I’ll now how to do it, because it’s not obvious at all).
So first the naive approach which doesn’t work:
-
stopped urbackupclientbackup service on the original server
-
I’ve download from the web-interface “download client for linux” the urbackupclient for the server I want to restore.
-
installed the downloaded client on a clean server and connected it
-
The connection was successfull. But that’s about the only thing that is successful…
-
It’s not possible to browse old backups, you only get an error message saying that there was an error. even using debug loging on urbackupclientbackend doesn’t reveal anything more.
-
Since I’ve read it in an other thread (several years old), I’ve tried first to do a backup of some random data. Afterwards the browse command worked, but ONLY showed the data I’ve just backup, none of the old ones.
-
I’ve managed to get the backup-id of the old backups from the web gui.
-
but even then, when trying to do a restore-start, nothing happens. when using the command, which is supposed to be the right one:
urbackupclientctl restore-start -b 1827 -d root -m / -t /root/test
(It took me quite a while to get those parameters. The documentation doesn’t explain well enough how to use them) The Result is:
Error starting restore. Errorcode: 4
When trying out (what should be incorrect, but was the first way I’ve tried it out)
urbackupclientctl restore-start -b 1827 -d / -m / -t /root/test
The result is:
Restore completed successfully.
But 0 bytes copied.
And in any case 0 infos in the debug log.
But I don’t give up that easily. So
- On the new client I’ve deleted /usr/local/var/urbackup/*
- Copied the whole /usr/local/var/urbackup/* directory from the original server
- started up urbackupclientbackend
- Now the browse command works, but o wonder, doesn’t shows the “test” backup I’ve just done before, but all the old backups.
- and unbelievable but true:
urbackupclientctl restore-start -b 1827 -d root -m / -t /mnt/restore
Now works!!!
So in about 20 hours I will see if at the end of the process I’ll have a working server again. Unfortunately, the real server can’t do any backups meanwhile :-(.
So it seems it is possible to restore a linux server on barebone. But man, it’s not straight forward. And not really well documented (e.g. that you need to copy the previous var/urbackup directory instead of just downloading a new client from the gui). Also the error messages urbackupclientctl give are basically useless. They just tell you there was an error , and that’s it (or even tell the command was successfull eventhough it wasn’t).
btw. If anybody want’s to know it: On the new server I didn’t install a new linux system, I’ve just started up from a grml cd (live linux for administrarion purposes), and there directly installed the urbackupclient (it will be installed in the ramdisk but works perfectly). From that live linux you can also recreate your partition layout, logical volumes, mbr, etc.