Script to Backup Save States and SRAM
-
sudo nano /home/pi/RetroPie/retropiemenu/Backup_Game_Saves.sh
#!/bin/bash rsync -av --exclude '/backups' --include '*/' --include '*.srm*' --include '*.bsv*' --include '*.sav*' --include '*.sta*' --include '*.fs*' --include '*.nv*' --include '*.rtc*' --exclude '*' /home/pi/RetroPie/roms/ /home/pi/RetroPie/roms/backups sleep 3
Save the file and exit.
Make executable:
sudo chmod +x /home/pi/RetroPie/retropiemenu/Backup_Game_Saves.sh
Save in /home/pi/RetroPie/retropiemenu folder to be able to launch from the RetroPie menu within ES.
When run, it will create a folder named "backups" in your roms folder. It will re-create an empty folder structure reflecting your entire roms folder. Then it will copy over any sram and save state files. On subsequent runs, it will skip anything that already exists, and overwrite if there is a newer file available. Then connect to \\retropie from your PC, and copy the backups folder off. If you ever need to resotre, just copy the contents of the backups folder to your roms folder on your re-built Pi, and it will move the files into the correct folders.
-
Cool solution ;)
I posted annother small script for such purposes here
This creates a zip file for each rom and takes as backup the same folder as the rom located.It took annother branch instead of searching all files that "could" be a savestate I said, every file with same name except the ROM-name is a savefile.
Thanks for this small script. I appreciate it :)
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.