All posts for the month August, 2016

I obviously wanted to make sure my save games and save states where all not only backed up to another local computer in my house(via rsync) but i also wanted an offsite copy. After looking around i decided to go with idrive. 5G free and they have a CLI that is supported on a surprising number of OS’s including Linux.


I set up an account and downloaded the Linux 64 bit version. It consists of a single executable that i then put in /storage/idrive. unfortunetly it requers libpopt which is not a part of lakka and lakka has no package management.

$ ldd idevsutil (0x00007ffd0f5fe000) => not found => /lib/ (0x00007fd8a9486000) => /lib/ (0x00007fd8a90e7000)
 /lib64/ (0x00007fd8a968a000)

Well shit. To fix this I started up a VirtualBox of, I think Arch, and scp’ed over to /storage/idrive/. Problem solved, even if it is super hacky.


We first have to configure our account to be able to use the CLI tool. You should create a file with your private encryption key password and another file containing your idrive password.  You can then run the –config-account option….

# ./idevsutil --config-account --enc-type=PRIVATE --pvt-key=/storage/idrive/pvt_key --user=USER_NAME --password-file=/storage/idrive/passwd
connection established

<tree message="SUCCESS" desc="ACCOUNT CONFIGURED" ⁄>

Success!. You now must fine the cmd utility server IP Address associated with your account. To do so run…

# ./idevsutil --getServerAddress USER_NAME

<tree message="SUCCESS" cmdUtilityServer="" cmdUtilityServerIP="IP_ADDRESS" webApiServer="" webApiServerIP="IP_ADDRESS"/>

HAZA! We can now finally start backing our things up.

Backing up

Create a file listing all the files and directors you want to back up. I called my file /storage/idrive/manifest


I decided to also back up the idrive directory because it was a bit of a pain to set up. Because of this you need to add the –tmp=/tmp/idrive arguemnt to your commands. If you dont it will faile to back up some temporary files that you actually dont even want.

# ./idevsutil --pvt-key=/storage/idrive/pvt_key  --files-from=/storage/idrive/manifest / USER_NAME@CLI_IP_ADDRESS::home/lakka --password-file=/storage/idrive/passwd --temp=/tmp/idrive
connection established
building file list ...
[ 2712553] [ 0] [ 46780031] [100%] [ 0.00kB/s] [storage/idrive/idevsutil]
[ 48240] [ 0] [ 46780031] [100%] [ 0.00kB/s] [storage/idrive/]


[ 13179] [ 0] [ 46780031] [100%] [ 0.00kB/s] [storage/savestates/Nestopia/Darkwing Duck (USA)]
[ 430181] [ 0] [ 46780031] [100%] [ 0.00kB/s] [storage/savestates/Snes9x/Legend of Zelda, The - A Link to the Past (USA)]

sent 3500 bytes received 40 bytes 2360.00 bytes/sec


lastly we set up cron and or small shell script to back things up every 10 min.

Cron entry:

0,10,20,30,40,50 * * * * /storage/idrive/ > /storage/idrive/backup_`

date +"%H%M"`
.log 2>&1

(Not sure why wordpress is freaking the fuck out)

The backtick voodo is so i get an hours worth of backup logs that overwrite themselves after one hour. Helpful if there is an issue and i don’t have to worry about rotating or deleting old logs as it does that itself.

And the contents of the is…


LD_LIBRARY_PATH=/storage/idrive /storage/idrive/idevsutil --pvt-key=/storage/idrive/pvt_key --files-from=/storage/idrive/manifest / xxann5@ --password-file=/storage/idrive/passwd --temp=/tmp/idrive

And thats it. I can now relax and know that every 10 min all my save data will be nice and safe.

Share Button