9

Using version 14.04 LTS. I've been using Duplicity to back up my home directory (/home/user) to an external hard drive (/media/user/Backup). I've just reinstalled 14.04 LTS. Now I want to restore my home directory to what it was before the reinstall.

I've tried using the gui "Backup" - choosing the last backup date to restore from and "restore to original folders" - this doesn't work. There is no change to my reinstall home directory. All I've noticed is that there is a lock symbol on my /home and /home/user folders after I tried this.

Is what I'm trying to do possible? If yes, how do I do it?

guntbert
  • 13,134
  • 1
    Yes has to be possible. That is the whole idea of a backup and would be a serious flaw if not possible. You probably are doing something wrong (though it is totally not clear to me what). Possible thing to consider: did you use the same username for old and new system? – Rinzwind Feb 22 '16 at 20:32
  • Please answer above and add whether you used encryption on the back-up files or not. – Fabby Feb 23 '16 at 19:39
  • Hi, yes same username. Don't think I encrypted backup, but I need to check that. How would I do that? – Curt Goff Feb 23 '16 at 22:04
  • To check if the backup is encrypted go to the backup directory and take a look into the last duplicity...............difftar.gz file. if you can unpack and antar it, than you didnt use a passwort for the backup. – cmks Mar 13 '16 at 16:01
  • Hi, I was able to extract a duplicity ........difftar.gz file to one with a difftar extension. I wasn't able to go any farther than that. So it appears I didn't encrypt my backup. Is there a next step? Thanks. – Curt Goff Mar 15 '16 at 03:10
  • Do you have the same username on both scenarios: backup and restore? I had a similar problem with deja-dup. For some reason, it did not store actual original path, but environment dependent path names. For instance: If I did backup /home/user1 and then tried to restore as root to its "original location" I got the restore placed under $HOME/dir/whatever. Where $HOME was taken from the current logged in user. – Awi Mar 28 '16 at 00:45
  • Additional note - untested backup is only slightly better than no backups. Test your backups, including restoration. http://taobackup.com/testing_info.html ("If you really believe that your backups are sound, would you be comfortable erasing everything on your hard drive right now, and restoring it from backups? ") – reducing activity Jul 03 '16 at 09:45
  • Is restore working on restoring it to /home/user/restore_test? Is restore working on booting from secondary OS/Live CD? – reducing activity Jul 03 '16 at 09:46
  • I was backing up two folders 'home' and 'home2'. When I do a restore to /home/user/restore_test, 'home2' restores completely; 'home' does not restore at all. – Curt Goff Jul 04 '16 at 17:48
  • 2
    You should definitely try to restore to a different folder and have look at the file information. Maybe your UID changed from the old install to the new one. – Björn Jul 08 '16 at 12:24
  • The "lock" on the restored home directory indicates a different uid. – guntbert Jul 26 '16 at 12:08
  • Failing using deja dup, you could manually unpack all the files from every tar file. Takes longer but has the same effect. Was it just one full backup or do you also have incremental in there? If there's incementals, unpack all the full ones, then the incrementals and say yes to overwriting files. – Delorean Aug 08 '16 at 17:00
  • @guntbert In that case, would the OP benefit from running chown <username>:<username> [Backup Directory name] to change the ownership of the backup from the previous owner to the current one? – user311982 Oct 01 '16 at 03:25
  • you could try restoring just the problematic folder by cd'ing to a new blank folder and issuing the command deja-dup --restore [full path to old home directory] – Organic Marble Oct 01 '16 at 03:53

1 Answers1

1

It's likely that the UID (the number behind your user name) has changed.

You'll probably need to find out the old UID (maybe it can be retrieved out of the backup somehow) and change your current user name's ID to the old number. Further information on how to do that is available in this question: How can I change my own user ID?