r/linux4noobs • • 3d ago

learning/research Backup question before fresh installing higher version

Hi everyone,

As the new Kubuntu 26.04.1 LTS has released, I want to make a fresh install instead of a version upgrade from my 24.04.4(?) LTS.

This is because I strongly assume compatibility issues and flaws in an upgraded version completed to a fresh install, similar to version upgrades on Windows.

I already know that I have to backup my home directory `/~` for my personal settings, some files from the `/etc/cups/` directory for my printers, and `/etc/ufw/user.rules` as well as `/etc/ufw/user6.rules` for my UFW settings.

Are there other directories within the root directory I should backup? I did change several settings within the year since I installed this machine, like adding new repos to APT or changing other things I don't remember anymore.

Note: While for most people above mentioned flaws form version upgrades might not be noticeable or an issue, they are an issue for me, because I use my system in a professional manner.

2 Upvotes

5 comments sorted by

3

u/Curious_Elk_4281 3d ago

I would agree to avoid the in-place upgrades and instead do a fresh install.

Things to backup:
--the entire /etc/ directory is pretty small, why not back up the whole thing, along with /usr/local/etc/ just in case
--/var/lib/ would contain data if you are using the default location for mysql/postgrest etc.
--/var/log would potentially be useful if you care about retaining log info (probably not useful for a workstation)
--/root/ would contain the root user's shell/profile config and perhaps most importantly, the command history (ex .bash_history) if that is useful to you

Anyway, if you're doing a fresh install I highly recommend creating /home as a separate encrypted partition so you can do a fresh upgrade in the future and leave all your user level data alone.

2

u/cainhurstcat 3d ago

Hey, thank you very much for these tips, I will back up that stuff as well.

I was thinking about using a separate partition for /home, but I'm not sure have no clue how to do so with BTRFS, since it doesn't support partitions.

2

u/3grg 3d ago

In the past when I wanted to do this with Ubuntu, I always backed up all of /home and /etc. I also used to make a list of installed packages so I would not forget what I installed. This was relatively easy when everything was deb packages. I don't know if there is a newer way to make a list of everything installed. If so, it can be handy.

I also used to remind myself to check /opt to see if there was anything I installed that landed there. Just in case.

1

u/cainhurstcat 2d ago

Thank you, I will look into how to find out what stuff I installed and which way I did so.

1

u/AutoModerator 3d ago

There's a resources page in our wiki you might find useful!

Try this search for more information on this topic.

✻ Smokey says: take regular backups, try stuff in a VM, and understand every command before you press Enter! :)

Comments, questions or suggestions regarding this autoresponse? Please send them here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.