1

I have an Ubuntu 12.04 backup that I did in 2017. I want to restore it to a server having Ubuntu 18.04. I've tried simply restoring the files with the exception of /boot and /etc/fstab as instructed here: https://serverfault.com/a/177230/124296

The first problem I have is that the new sudo user account is getting mapped to a random (I guess matching the user id) old account and I don't have the required password (I only have the one for root). Essentially if I do sudo after the restore I can't authenticate.

The second issue is that when I try to connect on a new Putty session it's unable to start an SSH session so I can't login as the old root account.

Is there a way to merge the old and new user accounts so I continue to use the new sudo user after the restore?

Are there files/directories I should avoid overwriting so the new system gets the applications and settings of the old one without rendering it unusable?

KalenGi
  • 375
  • 2
  • 5
  • 9
  • 3
    You can't just 'restore' a 12.04 on top of an 18.04. The backup you used will *break everything* when straight restored. You should instead 'restore' the 12.04 backup to a secondary directory, and then extract the bits you actually need. Consider that between 2012 and 2018, the system has **RADICALLY** changed from the perspective of config files, libraries, etc. so you can't reliably restore a 12.04 on top of an 18.04 as you are anticipating doing. – Thomas Ward Sep 03 '19 at 14:33
  • 2
    Generally with Linux, better to do new install & restore from your backup. Where backup is /home, your data, your applications & since server any folders in / like database, web or other server apps that you install. Note that your link is 9 years old and was mostly discussing moving to a new system with same install. https://ubuntuforums.org/showthread.php?t=2389631&p=13757986#post13757986 & https://askubuntu.com/questions/2596/comparison-of-backup-tools – oldfred Sep 03 '19 at 15:40
  • @ThomasWard For once, I agree with you. **;-)** (See answer) – Fabby Sep 05 '19 at 21:38

1 Answers1

1

What you're trying to do is impossible:

There are 2 kinds of backups:

  • System Backups
  • Data Backups

A System Backup should be restored to an empty hard drive and it'll boot

A Data Backup should be restored to a running system

What you're trying to do is to restore a Data Backup of / to a running system and that will not work! So restore the /home/xxx/Videos, Documents, Pictures but do not restore the system files, unless you have a Cold¹, Off-line System backup

Note 1: for the pros: yes, I know you can make warm, on-line system backups, but it doesn't look like the OP has one of these.

Fabby
  • 34,341
  • 38
  • 97
  • 191
  • This is the clearest explanation of why it doesn't work – KalenGi Sep 08 '19 at 10:22
  • Sorry to not be of more help but if you need real System Backups in the future, have a look at [CloneZilla Live](https://clonezilla.org/clonezilla-live.php) – Fabby Sep 12 '19 at 18:11