How do you move your config files between installs?

Great tips! I’ll look into it.
Thank you so much!

For the encrypted usb stick encrypt it with luks & create a zfs pool on it with the option -O copies=3 for a bit of extra safety.

1 Like

:clown_face:

3 Likes

I found a really good tool for moving configs, that is Chezmoi.

1 Like

This has been great tool.

This is how I’ve been doing it so far, mostly:

1 Like

On KDE Plasma, I use kup. I’ve automated a backup of most of /home (including dot files) every hour to a second drive on my laptop, and then periodically copy this to an external drive. I can also start a backup from the system tray (e.g. before large and/or significant updates).

1 Like

I was looking for a transfer tool only for the dotfiles, to transfer .zshrc etc but not other configs.
I would still like to customize my new install to be different from my older one.

kup lets you choose precisely which files to backup, where to (e.g. an external drive), and how often. So you could select only .zshrc (and any others you want to). It will also appear in the system tray when you connect an external drive you have specified and give you the option of backup up those files immediately by clicking on a button.

Two solutions using rsync slipped my mind.

1 - For a scheduled backup to a location that is always mounted you can use cron https://wiki.archlinux.org/title/Cron.

Once you’ve installed (e.g.) cronie and enabled (e.g.) cronie.service, you can enter crontab -e on the command line. As an example, to backup .zshrc every 30 minutes past the hour to /home/$User/Backups, you could type:

30 * * * * rsync -r -t -v --progress --delete -l -s /home/$User/.zshrc /home/$user/Backups >/dev/null 2>&1

2 - To backup .zshrc to a location on an external drive once you have connected it, you could create a .bash alias. As an example:

alias rsync-zshrc="rsync -r -t -v --progress --delete -l -s /home/$User/.zhsrc /run/media/$User/$Drivename/Backups"

These days, there isn’t much reason to run a cron. You can use systemd timers for most things you would have historically used a cron for.

Since your system is probably using a bunch of timers anyway, that keeps everything in one place.

I don’t deny that I am older than Unix… :older_man:

1 Like

I copy only the most important ones. For example when I was using Sway on Arch and wanted to try Gentoo, I obviously copied my sway and waybar configs.

1 Like