Corrections to backup function

This commit is contained in:
icenine451 2023-08-17 13:38:18 -04:00
parent 2fcb114eed
commit f220927227
3 changed files with 9 additions and 6 deletions

View file

@ -261,6 +261,7 @@ update_rpcs3_firmware() {
} }
backup_retrodeck_userdata() { backup_retrodeck_userdata() {
mkdir -p "$backups_folder"
zip -rq9 "$backups_folder/$(date +"%0m%0d")_retrodeck_userdata.zip" "$saves_folder" "$states_folder" "$bios_folder" "$media_folder" "$themes_folder" "$logs_folder" "$screenshots_folder" "$mods_folder" "$texture_packs_folder" "$borders_folder" > $logs_folder/$(date +"%0m%0d")_backup_log.log zip -rq9 "$backups_folder/$(date +"%0m%0d")_retrodeck_userdata.zip" "$saves_folder" "$states_folder" "$bios_folder" "$media_folder" "$themes_folder" "$logs_folder" "$screenshots_folder" "$mods_folder" "$texture_packs_folder" "$borders_folder" > $logs_folder/$(date +"%0m%0d")_backup_log.log
} }

View file

@ -28,9 +28,7 @@ finit_options_list="$emuconfigs/defaults/retrodeck/reference_lists/finit_options
splashscreen_dir="/var/config/emulationstation/.emulationstation/resources/graphics/extra_splashes" # The default location of extra splash screens splashscreen_dir="/var/config/emulationstation/.emulationstation/resources/graphics/extra_splashes" # The default location of extra splash screens
current_splash_file="/var/config/emulationstation/.emulationstation/resources/graphics/splash.svg" # The active splash file that will be shown on boot current_splash_file="/var/config/emulationstation/.emulationstation/resources/graphics/splash.svg" # The active splash file that will be shown on boot
default_splash_file="/var/config/emulationstation/.emulationstation/resources/graphics/splash-orig.svg" # The default RetroDECK splash screen default_splash_file="/var/config/emulationstation/.emulationstation/resources/graphics/splash-orig.svg" # The default RetroDECK splash screen
multi_user_data_folder="$rdhome/multi-user-data" # The default location of multi-user environment profiles
multi_user_emulator_config_dirs="$emuconfigs/defaults/retrodeck/reference_lists/multi_user_emulator_config_dirs.cfg" # A list of emulator config folders that can be safely linked/unlinked entirely in multi-user mode multi_user_emulator_config_dirs="$emuconfigs/defaults/retrodeck/reference_lists/multi_user_emulator_config_dirs.cfg" # A list of emulator config folders that can be safely linked/unlinked entirely in multi-user mode
backups_folder="$rdhome/backups" # A standard location for backup file storage
rd_es_themes="/app/share/emulationstation/themes" # The directory where themes packaged with RetroDECK are stored rd_es_themes="/app/share/emulationstation/themes" # The directory where themes packaged with RetroDECK are stored
lockfile="/var/config/retrodeck/.lock" # where the lockfile is located lockfile="/var/config/retrodeck/.lock" # where the lockfile is located
default_sd="/run/media/mmcblk0p1" # Steam Deck SD default path default_sd="/run/media/mmcblk0p1" # Steam Deck SD default path
@ -174,4 +172,8 @@ else
prepare_emulator "all" "postmove" prepare_emulator "all" "postmove"
conf_write conf_write
fi fi
# Static variables dependent on $rd_conf values, need to be set after reading $rd_conf
backups_folder="$rdhome/backups" # A standard location for backup file storage
multi_user_data_folder="$rdhome/multi-user-data" # The default location of multi-user environment profiles
fi fi

View file

@ -879,7 +879,7 @@ configurator_retrodeck_troubleshooting_dialog() {
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \ --window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Configurator Utility - Backup in Progress" \ --title "RetroDECK Configurator Utility - Backup in Progress" \
--text="Backing up RetroDECK userdata, please wait..." --text="Backing up RetroDECK userdata, please wait..."
if [[ -f $backups_folder/$(date +"%0m%0d")_retrodeck_userdata.zip ]]; then if [[ -f "$backups_folder/$(date +"%0m%0d")_retrodeck_userdata.zip" ]]; then
configurator_generic_dialog "RetroDECK Configurator - Backup: RetroDECK Userdata" "The backup process is now complete." configurator_generic_dialog "RetroDECK Configurator - Backup: RetroDECK Userdata" "The backup process is now complete."
else else
configurator_generic_dialog "RetroDECK Configurator - Backup: RetroDECK Userdata" "The backup process could not be completed,\nplease check the logs folder for more information." configurator_generic_dialog "RetroDECK Configurator - Backup: RetroDECK Userdata" "The backup process could not be completed,\nplease check the logs folder for more information."