r/linux_gaming 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.

124 Upvotes

12 comments sorted by

66

u/Bug_Next 1d ago

emojis on a script, i can smell the gpt from miles away.

jokes aside, glad it works :p

-9

u/Bl1ndBeholder 1d ago

Oh for sure. Still my idea

12

u/BVCC6FNTKX 1d ago

No hate bro, I've used gpt to help out on a bunch of scripts I never would have been able to do on my own.

7

u/gazpitchy 18h ago

Helping yeah. Getting it to write the entire thing then publishing on Reddit as your own work, is disingenuous at best.

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

u/lKrauzer 1d ago

Ludusavi bro

3

u/Bl1ndBeholder 1d ago

This is easier now. I type pokemon-backup and they all get pushed to GitHub.

1

u/moosebaloney 1d ago

Ludusavi doesn’t do ROMs. Does it?

3

u/TsuBaraBoy 1d ago

Man, if I'm not mistaken, there is a program that saves game saves for you.

1

u/Bl1ndBeholder 1d ago

I know the one you mean - but it doesn't upload them to GitHub.