2

To day i backup my system with TAR.

cd /    
tar -cvpzf backup.tar.gz --exclude=/backup.tar.gz --one-file-system /

And restore this backup file to new my VPS:

tar -xvpzf backup.tar.gz -C / --numeric-owner

And i update-grub after restore that file.

update-grub

Then my vps start normal but when i login, it's stuck at: and this is image

Anyone can help me? Thank!

  • What happens when you hit enter , try to run a command, ssh into the server, or change virtual terminals ? – Panther Sep 24 '17 at 14:16
  • I send you a server address and crendial: – Soya Yoo Sep 24 '17 at 14:19
  • You've copied everything, including libraries and system utilities. There's a fair chance something is broken. Rather copy all the user data, make a list of installed packages, and install those packages at the new system. – vidarlo Sep 24 '17 at 14:35
  • Please remove that IP add and password you posted – George Udosen Sep 24 '17 at 14:41
0

So. You've copied potantially conflicting libraries onto the new VM, and I'm guessing this may create problems for you. As this is a fresh install, I'd suggest doing the following:

  • Duplicate installed software:
    • dpkg --get-selections > packages.txt on the old system will give you a list of all packages installed on the old system.
    • Copy this file to the new system, and run sudo dpkg --set-selections < packages.txt
    • run sudo apt-get dselect-upgrade to perform actual installation according to the list.

This should give you identical software on the two systems. When this is done, you can start copying user data. /home you can copy by creating a tar archive, or you can simply run sudo rsync -avr oldhost:/home/ /home/ on the new host. This uses ssh to copy data. Repeat for other areas with user data. Databases is best copied using mysqldump.

Then add users as per the old system. If you're brave or have many users, you can simply copy the relevant portions of /etc/passwd and /etc/shadow (but DO NOT copy the system users, as they may have changed).

The next step is to start moving settings. This is a somewhat manual process; copying /etc/ in verbatim is likely to provide strange results. Copy what you actually need, and if software has changed major versions, re-implement it by looking at the old configuration.

Copying / like you've done has created a system where package db is inconsistent with what's actually installed and you have the risk of old, conflicting libraries and binaries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.