Backing up and restoring Linux filesystem (for Distro/DE hopping) - polv's coding blog
If you want to fully backup home folder (or folder specified by $HOME environment variable, or ~), it's as simple as fully backuping everything in that folder, including hidden files and folders. (cp -r $HOME/ $HOME/. $TARGET/); or better yet, creating a dedicated HOME partition.
However, you won't get a clean reinstall. Also, on changing desktop environments (DE), there may be some (undesirable) changes carried over from the old desktop environment. Not to mention that, there are some cached files and unimportant carried over to the backup, in case of external backup as well.
Therefore, in case of external backup, I recommend using rsync, using commands similar to the following,
rsync -axXv --exclude={"/.c
Backing up and restoring Linux filesystem (for Distro/DE hopping) - polv's coding blog
If you want to fully backup home folder (or folder specified by $HOME environment variable, or ~), it's as simple as fully backuping everything in that folder, including hidden files and folders. (cp -r $HOME/ $HOME/. $TARGET/); or better yet, creating a dedicated HOME partition. However, you won't get a clean reinstall. Also, on changing desktop environments (DE), there may be some (undesirable) changes carried over from the old desktop environment. Not to mention that, there are some cached files and unimportant carried over to the backup, in case of external backup as well. Therefore, in case of external backup, I recommend using rsync, using commands similar to the following, rsync -axXv --exclude={"/.c
https://www.polv.cc/post/2021/08/backup-restore-linux