Last active
April 26, 2022 16:04
-
-
Save FarisHijazi/6b67ac9ed9c28d0e085d25e38f024ae2 to your computer and use it in GitHub Desktop.
LGHUB backup and restore profiles and settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo backing up LGHUB | |
rm -rf LGHUBlocal LGHUBroaming | |
cp -r C:/Users/faris/AppData/Local/LGHUB LGHUB-local | |
cp -r C:/Users/faris/AppData/Roaming/LGHUB LGHUB-roaming | |
zip -r LGHUB-local-`date +%Y%m%d_%H%M%S`.zip LGHUB-local/* | |
zip -r LGHUB-roaming-`date +%Y%m%d_%H%M%S`.zip LGHUB-roaming/* | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo restoring LGHUB | |
LGHUBroaming=$(ls -t1 LGHUB-roaming-*|head -n1) | |
LGHUBlocal=$(ls -t1 LGHUB-local-*|head -n1) | |
rm -rf C:/Users/faris/AppData/Roaming/LGHUB-roaming | |
unzip ${LGHUBroaming} -d C:/Users/faris/AppData/Roaming/ | |
rm -rf C:/Users/faris/AppData/Roaming/LGHUB | |
mv "C:/Users/faris/AppData/Roaming/LGHUB-roaming" "C:/Users/faris/AppData/Roaming/LGHUB" | |
rm -rf C:/Users/faris/AppData/Local/LGHUB-local | |
unzip ${LGHUBlocal} -d C:/Users/faris/AppData/Local/ | |
rm -rf C:/Users/faris/AppData/Local/LGHUB | |
mv "C:/Users/faris/AppData/Local/LGHUB-local" "C:/Users/faris/AppData/Local/LGHUB" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment