Linux Lite Forums

Software - Support => Installing Linux Lite => Topic started by: Ozpos on May 31, 2022, 10:34:18 PM

Title: Migrating apps and config from LL 6.0 RC1 to 6.0 Final
Post by: Ozpos on May 31, 2022, 10:34:18 PM
Hi All,  Congratulations and a big thank you to all those involved with the Final Release.

I have been using 6.0 RC1 for some time and I know there is not an upgrade path to Final. 

Could someone please tell me what is the best way to migrate my apps and config to a new install on a second drive in the same machine ?

Many thanks in advance,
oz.
Title: Re: Migrating apps and config from LL 6.0 RC1 to 6.0 Final
Post by: Moltke on June 01, 2022, 12:33:00 PM
Hi All,  Congratulations and a big thank you to all those involved with the Final Release.

I have been using 6.0 RC1 for some time and I know there is not an upgrade path to Final. 

Could someone please tell me what is the best way to migrate my apps and config to a new install on a second drive in the same machine ?

Many thanks in advance,
oz.

Hi,
Not sure what you mean by migrating apps, but if you mean having then installed in your new install, then you could:
1. Write down their names, so you can install them in the new system.
2. Launch a terminal and run:
Code: [Select]
apt list --installed > my_apps.txt this will give you a list you can then use to install the apps. You can also use this
Code: [Select]
egrep 'apt(-get)? +install' /var/log/apt/history.log to get a list of recently/manually installed pkgs.
As per your configuration files, they're located in $HOME/.config and $HOME/.local, most fo them at least, since some apps like Firefox save to their own directory, $HOME/.mozilla. You can check which apps have their own .dir by launching thunar and pressing Ctrl + h and you could save those directories to an external USB drive, and then just copy over to the new install. I use a script for that:
Code: [Select]
#!/bin/bash
DIRLIST=(~/.config ~/.local ~/.mozilla ~/.zoom ~/.claws-mail ~/.bash_history)
DIRLIST1=(~/Documentos ~/Descargas ~/Imágenes ~/Vídeos ~/Appimages ~/bin)
TARGET="/path/to/USD DRIVE/target_dir/dot_files"
TARGET1="/path/to/USD DRIVE/target_dir/"

cp -r -v -u "${DIRLIST[@]}" "$TARGET" && cp -r -v -u "${DIRLIST1[@]}" "$TARGET1"
You can copy that and paste to  a new file in a text editor, then edit to meet your system's info, such as:
DIRLIST and DIRLIST1 = Add/remove whatever it is you need/don't need.
TARGET = Replace /path/to/USD DRIVE/target_dir/dot_files with the actual path, i.e, /media/$USER/USB DRIVE/target_dir/dot_files where $USER is your username and you can actually use that variable in the script. Target_dir is the dir you save the configuration files to, for example, LL_BACKUP, and dot_files is another directory you're saving all the configurations stored in your $HOME/hidden_directories(which you can see in thunar by hitting Ctrl + h)
TARGET1 = Replace /path/to/USD DRIVE/target_dir/ as you did above, i.e, /media/$USER/USB DRIVE/LL_BACKUP/, here, if you so decide, you can save your personal files such as music, downloads, videos, pictures and anything else you want/need to, just add the path in the script. The line
Code: [Select]
cp -r -v -u "${DIRLIST[@]}" "$TARGET" && cp -r -v -u "${DIRLIST1[@]}" "$TARGET1" -r tells cp to copy recursively the contents of the dirs enclosed in parentheses, and -r shows you the process in the terminal, lastly -u tells cp to copy new files and update those already present only if there's new info to add. After you finish editing, save it, you need to make it executable
Code: [Select]
chmod +x copy.sh then run from terminal
Code: [Select]
./copy.sh
I use this as a way to back up my "dot_files", that is, those hidden files and directories in my /home dir I want to keep safe for reuse, and execute it at least twice a week. I have that in my ~/bin dir, so I simply run in a terminal copy and that's it. :)