Нема описа

Jandalf81 df8f530923 rclone_script-install.sh пре 7 година
ReadMe.md fcc025601e Extended ReadMe.md пре 7 година
rclone_script-install.sh df8f530923 rclone_script-install.sh пре 7 година
rclone_script-menu.sh df8f530923 rclone_script-install.sh пре 7 година
rclone_script-uninstall.sh 5171a24c48 made puTTY draw fancy lines ;-) пре 7 година
rclone_script.sh df8f530923 rclone_script-install.sh пре 7 година

ReadMe.md

rclone_script

Setup cloud synchronization for the save files on your RetroPie

What does this do?

This script will setup different things on your RetroPie in order to automatically sync save files to a cloud service supported by rclone

What will you have to do?

Just install this via

wget -N -P ~/scripts https://raw.githubusercontent.com/Jandalf81/rclone_script/master/rclone_script-install.sh;
chmod 755 ~/scripts/rclone_script-install.sh;
~/scripts/rclone_script-install.sh;

and follow the instructions.

I recommend reading this page completely before actually doing this! Also, I made this IMGur album to show you the installation process and what happens afterwards.

Again, what does this do?

Let me give you a rundown of the things this script will do:

  1. This script will install the RCLONE binary. It will be downloaded directly from their website as the binary installable via apt-get is quite old, sadly. RCLONE actually is what allows us to use a number of different cloud services, see their website for a complete list
  2. The script will then ask you to define a remote. That is the other side used for the synchronization. That remote has to be called retropie, the script will not continue without it. Please consult the RCLONE documentation on how to configure remotes for different cloud services
  3. Then, PNGVIEW will be downloaded, compiled and installed. That will be used to show you notifications when up- and downloading save files.
  4. IMAGEMAGICK will be installed via apt-get, this will be used to actually create images containing the notifications which are shown by PNGVIEW
  5. The other scripts you see here will now be downloaded. They are used to control RCLONE whenever it needs to sync your save files. Notice that there's also a script to remove all of this from your RetroPie.
  6. Some scripts from RetroPie will be changed so they call one of the scripts from step 5 which then calls RCLONE... Sounds complicated but you don't have to do anything (for the curious: those are the RUNCOMMAND-ONSTART and RUNCOMMAND-ONEND scripts)
  7. Right next to the ROMS directory, a new directory SAVES will be created, containing a subdirectory for each system
  8. Now, the setup script will ask you to enter a name for the remote base save directory. This is the directory where the save files will be synced to. You can enter any name you like, I recommend calling it RetroArch. After naming it, the setup script will create this directory and one subdirectory for each system RetroPie supports at the remote destination (if necessary)
  9. Your RetroPie will be configured so each system uses it's own directory for saves. Before, RetroPie looked for these files in the ROMS directory (which made syncing them without accidentially uploading a ROM - ILLEGALLY - so much more difficult)
  10. That's it, setup is complete. If you already have some save files within the ROMS directory you need to move them to their subdirectory within the SAVES directory now

What will RetroPie do after this script is installed?

Whenever you start or stop playing a game, the acompanying save files will be down- or uploaded to the configured remote:

  • starting a game will trigger RCLONE to download save files for the game from the remote
  • stopping a game will trigger RCLONE to upload save files for the game to the remote

In the RetroPie menu, there will also be a new menu item "_RCLONESCRIPT full sync". Starting this menu item will up- and download newer files to and from the remote, so each side should have the latest save file for each game afterwards. Please note that this will also download save files even if the acompanying ROM is not on your RetroPie.

Of course, all of this only works if your RetroPie has access to the configured cloud service.

Why do this?

Well, I have two big reasons:

  1. I wanted an offsite backup of my save files. I have started Chrono Trigger so many times and always lost the save by tinkering with my RetroPie...
  2. I wanted to be able to seamlessly continue playing on another machine. Now I can...
    • start the game on RetroPie, play for an hour, save and automatically upload to DropBox
    • download the save file to Android via DropSync and continue playing there via RetroArch for Android (don't forget to upload afterwards!)
    • continue playing on my PC which is synced automatically via the DropBox client (which also uploads again automatically)
    • then return to RetroPie, which auto-downloads the save when I start the game there

Are there risks?

Of course! I'm a hobby programer, so this script might have errors I just haven't found yet. I'll do my best to fix them, though. There are some things which just will not work with any sync, e. g. conflicting file changes. I strongly advice you to only change one side of each synced save file. In other words, don't play Chrono Trigger on you RetroPie and on your PC simultaneously and expect to keep both save slots intact...

This is great! How can I thank you?

First of all: You don't have to. I made this script for myself first of all. I'm happy already if someone else can use it. I only ask you to report any problems or feature requests here.

If you really want to thank me, you could use this DropBox referral link to create your account there. This will give us both 500 MiB extra (on top of the default 2 GiB) when you install the DropBox client. That will be enough for a good number of save files... ;-)

Sources

These are the sites I used as source: