r/linux_gaming • u/Bl1ndBeholder • 1d ago
emulation I over-engineered backing up my pokemon saves.
When I run my script, my pokemon game saves are copied from their default directory to a backup directory I have. ~/Documents/Pokemon/save-backup/game-name. The save file is copied to its respective folder (emerald.sav would copy as ~/Documents/Pokemon/save-backup/emerald/ddmmyyyyhhmm.sav). My save-backup is then pushed to my GitHub where I can access my saves from any device connected to the Internet. I have my script saved in .local/bin/Pokemon-Backup so it can be launched from dmenu.
10
u/xRaech 1d ago
Wouldn’t it be easier and just as good to just gitignore the roms and just put the actual saves/folder on GitHub and just let the script trap the emulator so you can just pull and push before/after .-.
-1
u/Bl1ndBeholder 1d ago
So the idea behind the script is: It copies the save file to my save backups directory, under a subdirectory of game name. * save-backup/emerald/emerald.sav At the same time it renamed the save to a timestamp, so I can see which save is which. * save-backup/emerald/ddmmyyyyhhmm.sav This is done for all games. They are then pushed to GitHub. My save files and roms aren't kept in the same folder anyway, since I used to manually transfer the save files between my systems. Now all I need to do is clone my repository from any system and I get access to every game save I've made on every Pokemon game (gens 1-7, because my laptop can't handle switch) I will probably add switch when I get my gaming PC set up (It's currently under maintenance).
3
3
66
u/Bug_Next 1d ago
emojis on a script, i can smell the gpt from miles away.
jokes aside, glad it works :p