LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   using server backup (with plesk) to restore from scratch on new server with no plesk. (https://www.linuxquestions.org/questions/linux-newbie-8/using-server-backup-with-plesk-to-restore-from-scratch-on-new-server-with-no-plesk-4175608797/)

ArchieBa 06-28-2017 12:56 PM

using server backup (with plesk) to restore from scratch on new server with no plesk.
 
Hi,

I would like to take the backup file (backup_xxxxxx_xxxxx.tar) and start a new server with it. What is the simplest way to do this?

I can log in SSH and get the file with
Code:

# username@remote:/file/to/send /where/to/put
Once that is done...

What do I do? lol

I need the backup file to overwrite everything to have an exact copy.

And finally, the backup file as made with plesk onyx and the new server would not have plesk. I was thinking of using something else but it can only be in SSh for now.


Will this cause trouble when I am using the backup file?


This will only be a dev server, so the old one still live.

Thanks!!

rtmistler 06-28-2017 01:59 PM

You can't "replace" a running Linux, or any other OS with an entire backup copy of that, "while it is running".

Prior to doing the next actions, evaluate them clearly as well as ensure you have a backup copy of everything.

Therefore what you can possibly do is live boot the system in question, if the normal boot drive happens to be mounted as part of that, unmount it.

And then I believe you can use dd to both extract and copy that entire tar image onto the target drive. Note you would not be extracting, a tar file is not zipped, it is just a combined file archive.

This is to be done with caution because if you mix up the if= and of= drive letters you can do the exact opposite of what you intend.

BIG HOWEVER: It is odd that you seem to have a .tar file representing an entire boot drive for a server.
A typical thing I would do is to create an ISO file representing that drive backup. Perhaps someone who is more server centric can add to this answer to help you. I therefore recommend you evaluate your options clearly before taking some next steps which could be unintentionally destructive to a boot disk, or the archive file you have.

How exactly was this tar file made?

jefro 06-28-2017 02:33 PM

Also tell a bit about these systems. Are they both remote? Do they ILO?

ArchieBa 06-28-2017 06:26 PM

The tar was made by plesk for the backup of the whole server. Now, it is possible it does not containt everything... but it contains everything a plesk backup can contain. Si from your questions, I'm guessing it does not contain everything. I think I will take a look at what is in it, that seems a good start. :)

After looking into it... From what I can see, it has all domain info, a bunch of .tgz files (backup_dd_conf, backup_ext_dist_dgri, backup_ext_dist_magicspam, backup_ext_dist_security-advisor, backup_ext_dist_servershield, backup_ext_magicspam, backup_fail2ban, backup_file_sharing, backup_modsecurity, backup_sb_server, backup_skel, etc.) then it has backup_info_xxxx.xml dump-header, dump-index

And a few more things: dumpresult_SUCCESS, object_index, props, status_OK, webcontent_index.




The server with plesk that made the backup is remote, the second just a computer that I has centos on it.

jefro 06-28-2017 07:25 PM

Tar is a very old tape backup program. It is usually a file by file means to move data. You could of course use dd to tape as a block device to capture the entire drive.

What it seems to be is that you have a copy of the config of that remote computer. None of the OS. I suspect that you'd have to make a clone of the remote OS and load enough to return this local system from tape.

ArchieBa 06-29-2017 08:29 AM

Quote:

Originally Posted by jefro (Post 5728492)
Tar is a very old tape backup program. It is usually a file by file means to move data. You could of course use dd to tape as a block device to capture the entire drive.

What it seems to be is that you have a copy of the config of that remote computer. None of the OS. I suspect that you'd have to make a clone of the remote OS and load enough to return this local system from tape.

Yeah, that is probably it.

Do you know if there a way to copy yum history and to reproduce it? (is that a good plan in the first place?)

jefro 06-29-2017 03:33 PM

Something like this should still work. https://unix.stackexchange.com/quest...x-installation


All times are GMT -5. The time now is 07:02 PM.