Update backup-raveos.sh
This commit is contained in:
parent
d36eaede1f
commit
abebf4ae48
1 changed files with 50 additions and 16 deletions
|
@ -5,10 +5,10 @@ bold=$(tput bold) # ${bold}
|
|||
normal=$(tput sgr0) # ${normal}
|
||||
yellow=$(tput setaf 3) # ${yellow}
|
||||
|
||||
zenity --info --title='Please pick a folder!' --text='Choose a folder!' --width='300' --height='100'
|
||||
zenity --info --title='Please pick a folder!' --text='Choose a folder!' --width='300' --height='100' 2>/dev/null
|
||||
|
||||
# Folder variable
|
||||
FOLDER=$(zenity --file-selection --title="Choose a backup directory" --directory)
|
||||
FOLDER=$(zenity --file-selection --title="Choose a backup directory" --directory 2>/dev/null )
|
||||
if [[ $? -eq 1 ]]; then
|
||||
echo You did not pick a ${bold}${yellow}folder.${normal} Exiting!
|
||||
exit 1
|
||||
|
@ -22,7 +22,7 @@ user_choice=$(zenity --list --checklist --width='600' --height='400' \
|
|||
--text="Select from the options below" \
|
||||
--column="Select" --column="Name" \
|
||||
FALSE "BACKUP All of My Data and Settings" \
|
||||
FALSE "RESTORE All of My Data and Settings")
|
||||
FALSE "RESTORE All of My Data and Settings" 2>/dev/null )
|
||||
if [[ $? -eq 1 ]]; then
|
||||
echo You did not pick an ${bold}${yellow}option.${normal} Exiting!
|
||||
exit 1
|
||||
|
@ -37,33 +37,48 @@ if [[ $user_choice = *"BACKUP All of My Data and Settings"* ]]; then
|
|||
echo -----------------------------------------------------
|
||||
echo Copying ${bold}${yellow}$USER Settings and Files${normal} into ${bold}${yellow}$FOLDER/${normal}
|
||||
|
||||
rsync -ap --info=progress2 /home/$USER/Games $FOLDER
|
||||
rsync -ap --info=progress2 /home/$USER/Games $FOLDER 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.librewolf $FOLDER 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.steam $FOLDER 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.icons $FOLDER 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.themes $FOLDER 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.mozilla $FOLDER 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.ts3client $FOLDER 2>/dev/null
|
||||
|
||||
mkdir -p $FOLDER/.config
|
||||
rsync -ap --info=progress2 /home/$USER/.config/Bitwarden $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/Bitwarden $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/heroic $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/burn-my-windows $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/btop $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/input-remapper-2 $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/Mumble $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/libvirt $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/corectrl $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/corectrl.ini $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/czkawka $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/vivaldi $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/BraveSoftware $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/FreeTube $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/libreoffice $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/dosbox-x $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/pavucontrol.ini $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/keepassxc $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/spotify $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/spotube $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/gtk-4.0 $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/qBittorrent $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/onlyoffice $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/jellyfin.org $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/nomacs $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/tutanota-desktop $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/kdeglobals $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/kdenliverc $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/kdenlive-layoutsrc $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/Signal $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/smplayer $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/discord $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/Vencord $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/torbrowser $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/goverlay $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/MangoHud $FOLDER/.config 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.config/easyeffects $FOLDER/.config 2>/dev/null
|
||||
|
@ -80,24 +95,39 @@ if [[ $user_choice = *"BACKUP All of My Data and Settings"* ]]; then
|
|||
rsync -ap --info=progress2 /home/$USER/.local/share/flatpak/overrides/ $FOLDER/.local/share/flatpak 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.local/share/lutris $FOLDER/.local/share 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.local/share/TelegramDesktop $FOLDER/.local/share 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.local/share/jellyfinmediaplayer $FOLDER/.local/share 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.local/share/Jellyfin\ Media\ Player/ $FOLDER/.local/share 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.local/share/Steam $FOLDER/.local/share 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.local/share/oss.krtirtho.spotube $FOLDER/.local/share 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.local/share/org.gnome.TextEditor $FOLDER/.local/share 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.local/share/kdenlive $FOLDER/.local/share 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.local/share/krusader $FOLDER/.local/share 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.local/share/lutris $FOLDER/.local/share 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.local/share/Mumble $FOLDER/.local/share 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.local/share/nomacs $FOLDER/.local/share 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.local/share/onlyoffice $FOLDER/.local/share 2>/dev/null
|
||||
rsync -ap --info=progress2 /home/$USER/.local/share/torbrowser $FOLDER/.local/share 2>/dev/null
|
||||
|
||||
|
||||
|
||||
mkdir -p $FOLDER/.var/app/
|
||||
rsync -ap --info=progress2 /home/$USER/.var/app/ $FOLDER/.var/app 2>/dev/null
|
||||
|
||||
mkdir $FOLDER/etc/
|
||||
sudo rsync -ap --info=progress2 /etc/libvirt $FOLDER 2>/dev/null
|
||||
mkdir -p $FOLDER/etc/
|
||||
sudo rsync -ap --info=progress2 /etc/libvirt $FOLDER/etc 2>/dev/null
|
||||
|
||||
sudo rsync -ap --info=progress2 /usr/share/jellyfin/web/config.json $FOLDER 2>/dev/null
|
||||
|
||||
if [[ $Locale == LANG=hu_HU.UTF-8 ]]; then
|
||||
echo ${bold}${yellow}Hungarian Language detected.${normal}
|
||||
# HU lang
|
||||
rsync -ap --info=progress2 /home/$USER/Asztal/ $FOLDER/
|
||||
rsync -ap --info=progress2 /home/$USER/Dokumentumok/ $FOLDER/
|
||||
rsync -ap --info=progress2 /home/$USER/Letöltések/ $FOLDER/
|
||||
rsync -ap --info=progress2 /home/$USER/Zenék/ $FOLDER/
|
||||
rsync -ap --info=progress2 /home/$USER/Képek/ $FOLDER/
|
||||
rsync -ap --info=progress2 /home/$USER/Videók/ $FOLDER/
|
||||
rsync -ap --info=progress2 /home/$USER/Asztal/ $FOLDER
|
||||
rsync -ap --info=progress2 /home/$USER/Dokumentumok/ $FOLDER
|
||||
rsync -ap --info=progress2 /home/$USER/Letöltések/ $FOLDER
|
||||
rsync -ap --info=progress2 /home/$USER/Zenék/ $FOLDER
|
||||
rsync -ap --info=progress2 /home/$USER/Képek/ $FOLDER
|
||||
rsync -ap --info=progress2 /home/$USER/Videók/ $FOLDER
|
||||
rsync -ap --info=progress2 /home/$USER/Calibre\ Library/ 2>/dev/null $FOLDER
|
||||
else
|
||||
echo ${bold}${yellow}English Language detected.${normal}
|
||||
# EN lang
|
||||
|
@ -106,7 +136,8 @@ if [[ $user_choice = *"BACKUP All of My Data and Settings"* ]]; then
|
|||
rsync -ap --info=progress2 /home/$USER/Downloads $FOLDER
|
||||
rsync -ap --info=progress2 /home/$USER/Music $FOLDER
|
||||
rsync -ap --info=progress2 /home/$USER/Pictures $FOLDER
|
||||
rsync -ap --info=progress2 /home/$USER/Videos $FOLDER
|
||||
rsync -ap --info=progress2 /home/$USER/Videos $FOLDER
|
||||
rsync -ap --info=progress2 /home/$USER/Calibre\ Library/ 2>/dev/null $FOLDER
|
||||
fi
|
||||
|
||||
if [[ $Desktop == GNOME ]]; then
|
||||
|
@ -122,9 +153,12 @@ if [[ $user_choice = *"BACKUP All of My Data and Settings"* ]]; then
|
|||
rsync -ap --info=progress2 /home/$USER/.local/state/dolphinstaterc $FOLDER/.local/state
|
||||
fi
|
||||
|
||||
echo ${bold}${yellow}$USER files and settings are copied. ${normal}
|
||||
echo ${bold}${yellow}$USER Files and Settings are backed up! ${normal}
|
||||
echo -----------------------------------------------------
|
||||
echo
|
||||
|
||||
sudo chown -R $USER:$GROUP $FOLDER
|
||||
echo ${bold}${yellow} BACKUP SCRIPT FINISHED SUCCESSFULLY! ${normal}
|
||||
fi
|
||||
|
||||
if [[ $user_choice = *"Restore all of my data and settings"* ]]; then
|
||||
|
@ -151,7 +185,7 @@ if [[ $user_choice = *"Restore all of my data and settings"* ]]; then
|
|||
echo -----------------------------------------------------
|
||||
sudo chown -R $USER:$GROUP /home/$USER/
|
||||
echo
|
||||
echo ${bold}${yellow}$USER settings RESTORED! ${normal}
|
||||
echo ${bold}${yellow}SETTINGS RESTORED SUCCESSFULLY! ${normal}
|
||||
fi
|
||||
|
||||
exit 1
|
Loading…
Reference in a new issue