0

I've got /home & /(filesystem) on separate partitions. I've upgraded a few times (xubuntu) but my OS has picked up the inevitable fud over the years & I want to do a fresh install.

To do a fresh install of / and keep home as is, use this method.

The only difference is that I don't want to ditch all of / without having the opportunity to back useful stuff up, in case I can selectively re-apply stuff or whatever. Does anyone have a guide to what to back up (if anything) from / ? All I can find is guides to back up the whole thing, which I don't want. Similarly is there an obvious way of saving a list of your installed programs or is it just the 'screenshots of programs menu' method?

Thanks

(note to mods: tags 're-installation' and 'software-installation' aren't allowed under the "installation tag not allowed" rule, even though they exist as alternatives. This is surely a bug)

2 Answers 2

1

To keep list of packages installed in the old system, you can do :

apt --installed list

or

dpkg --list

and redirect it into some file in home filesystem. Then if you want to back-up some subdirectories in / directory, you can use tar with appropriate parameters. I recommend to back-up /etc. Also some logs in /var/log might be useful for future comparison with the new system. If you have small / filesystem and you want to back up the whole / filesystem, then use tar with parameter --one-file-system .

1

Backuping your root

Get the root partition device, using mount :

$ mount
[...]
/dev/sdXY on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
[...]

Mount it on another directory (replace /dev/sdXY using your partition):

$ sudo mkdir -p /mnt/root
$ sudo mount /dev/sdXY /mnt/root

Copy it to another partition, without file permission changes (in the example, I'll use /home):

$ sudo cp -rfp /mnt/root/ /home/old_root

Getting all installed programs

I think that the best way to get this is observing the list of installed packages. In Ubuntu, the program instalation in most cases is done with packages, if you reinstall the package of the corresponding program, you will get the program back.

To get the list of the instaled packages:

$ dpkg -l |grep ^ii

If you wanna save it in a file, you can add > path/to/file in this command. For example:

$ dpkg -l |grep ^ii > /home/user/package_list

You must log in to answer this question.

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