Ubuntu 14.04: Restoring Files

This is a continuation of my previous post on my install of Ubuntu 14.04.  In this post, I took notes on restoring files from my backup.  You can see the complete list of posts on Ubuntu 14.04 on my main install page.

Before installing, I had used Deja-Dup and duplicity to back up my laptop before I installed it.  I’ll blog screenshots of backing it up eventually.  The first thing after reformatting and installing is to restore my files back onto the laptop.  On my last install, I used the command-line to install.  This time, I wanted to try a GUI method.

First, I opened up the Backups preferences, and set the location where I had previously backed up.

Backups -- Setting the Backup Location

After that, I could open the folder up, and right click to get the “Restore Missing Files…” option.

Restore Missing Files Option

That gave me a dialog to restore the files.  The first option is where the backed up files are located.

Restore Wizard -- Page 1

As it scanned through the backed up files, it realized that I needed a password.

Backups -- requesting password

For some reason, it kept asking me for the password over and over.  I finally just hit cancel.  I had told it to remember the password.  When I tried the second time, it worked.  It seemed like it also worked better when I opened nautilus to the USB drive where the backup was located.

Eventually, I got it to work.  It gave me a list of files to restore.

List of files to restore

Once I made my selection, it confirmed.

Confirming the Restore

It took a minute to restore.  Just the “preparing” step takes a minute.

Restore Progress

After a while, it was done.

Restore Finished

As an alternative, here’s the command-line way to do the restore:

<br />
$ duplicity --file-to-restore home/skp/.config/google-chrome-beta \<br />
      file:///media/skp/FreeAgent\ GoFlex\ Drive/backup-repo/pistachio/2014-05-02/<br />
      ~/.config/google-chrome-beta

 List of Restores

These are the directories that I restored from my backup:

  • ~/Documents: This is where I put all my document files
  • ~/Pictures: I have Shotwell pointed at this directory, so it contains all the pictures from my cell phone and digital camera
  • ~/Highstreet: I keep my work files in a different directory
  • ~/app: This has all of my programming stuff (“application development”)
  • ~/.config/google-chrome-beta: The settings for Chrome (extensions, bookmarks, etc)
  • ~/.local/share/keyrings: My saved passwords, see below for more information
  • ~/.Skype: Skype history
  • ~/.remmina: The settings for my remote connections
  • ~/.ssh: The keys for my remote ssh connections
  • ~/.local/share/shotwell: The settings and thumbnails for my photos (moved from ~/.shotwell, see Ask Ubuntu)
  • ~/.sword: The downloaded Bible files for Xiphos (and the underlying Sword library)
  • ~/.filezilla: The settings for my FTP connections
  • ~/.sqldeveloper: The connection settings for SQL developer
  • ~/.vim: stores the plugins installed in Gvim
  • ~/.vimrc: preferences for Gvim
  • /etc/NetworkManager/system-connections: this saves all of my wireless connections and VPN connections

There were a few directories that I restored last time but not this time.  I’ll list those just in case I need to remember them, but I didn’t do anything with them this time.

  • ~/.local/share/evolution and ~/.config/evolution for Evolution Email (had to reboot for Evolution to pick it up)
  • ~/VirtualBox VMs: These are the virtual computers
  • ~/.VirtualBox: The settings for my virtual machines

Network Manager

To backup my Network Manager connections, I had just copied the entire /etc directory over to my backup drive.  Therefore, I didn’t use the deja-dup or duplicity to restore it.  The challenge is that you need administrative permissions.  You can either do it from the command-line, or you can open the file browser with administrative authority:

sudo nautilus

Keyring Restores

I copied my old files from ~/.gnome2/keyring and ~/.local/share/keyrings to my current ~/.local/share/keyrings.

Restoring old key ring files

Then, I had to log out and back in again for it to see the new keyrings …

Passwords and Keys Program

Once I saw the new keyrings, I right clicked on each one and unlocked them by entering the my old login password:

Unlocking keyrings

So, what if I want to merge the keyrings so that I don’t have multiple?  Here’s my attempt.

First, very important: I backed up my $HOME/.local/share/keyrings directory to my ~/Downloads directory.  That way, if I messed something up, I could always go back.

Next, I removed the password from all of my “Login” keyrings.  I did that by right clicking on the keyring and selecting Change Password:

Removing Password with Change Password

It prompted for the old password, which was my login password.  Then, it prompted for the new password.  I left that blank:

New Password dialog

When I entered the blank password, it warned me about being insecure.  That’s okay because I won’t leave it this way.

Unencrypted Warning

Now, with all of the passwords removed, the files are in clear text.  I can open them in the text editor.  I copied everything after the “[keyring]” section and pasted it into the main or original Keyring content.

Copying Keyring content

I also changed the “display-name” parameter at the top of the old files so that I would know which ones were old in the Passwords application.

Now, I closed the “Passwords and Keys” application and re-opened it.  Then, I could see the new names on the keyrings.  I deleted all of the old ones.

Deleting a keyring

It did confirm before deleting.

Delete confirmation

Finally, I changed the password on the original keyring back to my login password.  It’s combined.

It sure would be nice if the program could do this in an automated fashion.

Next Steps

If you want to follow along with my install, continue on to my Networking/Internet setup post.

Resources

Leave a Comment

Your email address will not be published. Required fields are marked *