6

Due to the route I came into Ubuntu I now have 12.10 upgraded from 12.04 on an NTFS file system. I've invested a lot of time getting everything as I want it, vis packages installed and settings, etc. I wonder if there is an easy method of:

1 Backing up the whole system so that I can;

2 Do a squeaky clean install of 12.10 on ext4 with bells and whistles then;

3 Restore my backup so that my system behaves as it did before the reinstall?

Sorry if this seems terribly obvious, but I don't want to find all the problems when it's too late.

TIA.

To let you know how this went:

  1. Used dpkg to list packages installed.

  2. Backed up using deja dup. Also manually backed up contents of /etc to include stuff that deja dup missed.

  3. Cleanly installed

  4. Restored deja dup backup and moved /etc contents back

Would not boot anymore. Complained about graphics, offered basic graphics, stalled.

Repeated 3 and 4 above, but backed up clean /etc after install, then

  1. Restored deja dup backup to /home/user but data ended up in /home/user/home/user. On closer inspection the two user directories have same inode but behave differently.

  2. Can no longer log on. Unable to write to .ICEauthority. Had to delete .ICEauthority and establish user as owner of all files in user to log in successfully.

  3. Copied contents of /home/user/home/user into /home/user. /home/user/home/user now empty. Moved /home/user/home to trash. When I try to delete /home from trash it prepares to delete what looks like the contents of /home/user. Closer inspection shows that /home/user has the same inode number as /home/user/.local/share/Trash/files/user - can I unlink and delete the unneeded trash version?

  4. Tried to reinstall software using dpkg but all packages listed as not in the database.

Merde! Any way out of this?

And to make matters worse, deja dup seems to have completely emptied my ~/.local/share/evolution folders of all date. I have lost all my email. Best to assume that this procedure is a non-starter and use more mundane methods a package at time.

2
  • By NTFS file system install, do you mean WUBI install?
    – user68186
    Nov 8, 2012 at 17:26
  • @user Now you ask I am mistaken. The install is on an ext3 will lots of NTFS litter from the original Windows restore partitions and what not. I for getting rid of those and consolidating the disk as ext4, and perhaps encrypted. Nov 8, 2012 at 18:39

2 Answers 2

3

Use Deja Dup backup tool to backup on a local or cloud folder (backup-folder). To restore, just open Deja Dup after clean installation, click 'I want to restore files from previous backup...' and give backup-folder path to restore the system.

Deja Dup

Deja Dup is available in Ubuntu Store.

1
  • Would this also serve to reinstall all previously installed packages and would it overcome all potential dependency problems? Nov 8, 2012 at 18:42
3

The easiest way of doing is consists of two parts: First, backup your complete home directory including hidden files. It contains all configuration and data specific to your user. The second part is to have a list of packages that are installed. You can use

aptitude search '~i'

to generate a list of all installed packages, filter for the lines that don't have an A. After installing your new system you can apply this list again in order to install all previously installed software. Have a look at the aptitude user manual on how to do that.

After installing the new system, you can restore the backup of your home directory and everything should be back.

The list of installed packages can be generated using following command:

aptitude search '~i' | grep '^..[^A]' | awk '{print $2}' > installed_packages.txt

The packages can then be reinstalled using the following command:

aptitude install $(cat installed_packages.txt)

Note that this may not produce exactly the same results as we filtered automatically installed packages in first command. It is better not to install automatically installed packages as they will remain on the system forever. However, some dependencies are only 'recommended', and they might not get reinstalled when applying the package list.

2
  • I can see how that might work. Can the list generated by aptitude be used to reinstall packages automagically later? What about stuff from repositories off ubuntu? Nov 8, 2012 at 18:44
  • See my edits to the answer. If you have stuff from packages outside the Ubuntu repository, you have to migrate the /etc/apt/sources.list.d directory to your new installation. When using PPA it is best to issue the PPA commands before applying the installed_packages.txt as PPA takes care of downloading the public keys of the repository. Also, run aptitude update before applying the list.
    – antiguru
    Nov 10, 2012 at 18:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .