
In this post, I thought I’d share my simple method for keeping my (mainly) retro games backed up on a USB hard drive. To start with, I was doing it all manually, but that soon grew tiresome so I decided to use the tried and trusted rsync to save time. Before I ran any commands on my proper game directory, I created a test folder to make sure everything worked as I wanted. Rsync is a program with lots of options, but here I’m only using it for a simple backup from one tree to another. Let’s get started!
If you’re not familiar with rsync, it generally takes a source folder and a destination folder, preceded by whatever options you want to use. Below, I’m using -navi which means:
-n – run in test mode (dry run)
-a – run in archive mode (which includes lots of options to save typing)
-v – run in verbose mode to give us info
-i – itemize what files are going to be added, deleted etc.
As you can see from the output below, rsync when used with -navi gives us a summary of everything that it’s going to do.
[simon@computer 14:38:24] ~/tmp
$ rsync -navi Games/ Games-backup
sending incremental file list
created directory Games-backup
cd+++++++++ ./
cd+++++++++ gb/
>f+++++++++ gb/A-mazing Tater (USA).gb
>f+++++++++ gb/Adventures of Lolo (Europe) (SGB Enhanced).gb
>f+++++++++ gb/Adventures of Star Saver, The (USA, Europe).gb
>f+++++++++ gb/Kirby's Block Ball (USA, Europe) (SGB Enhanced).gb
>f+++++++++ gb/Kirby's Dream Land (USA, Europe).gb
>f+++++++++ gb/Kirby's Dream Land 2 (USA, Europe) (SGB Enhanced).gb
>f+++++++++ gb/Kirby's Pinball Land (USA, Europe).gb
>f+++++++++ gb/Kirby's Star Stacker (USA, Europe) (SGB Enhanced).gb
>f+++++++++ gb/Wario Blast Featuring Bomberman! (USA, Europe) (SGB Enhanced).gb
>f+++++++++ gb/Wario Land - Super Mario Land 3 (World).gb
>f+++++++++ gb/Wario Land 3 (World) (En,Ja).gbc
>f+++++++++ gb/Wario Land II (USA, Europe) (SGB Enhanced) (GB Compatible).gbc
>f+++++++++ gb/Yoshi (USA).gb
>f+++++++++ gb/Yoshi's Cookie (USA, Europe).gb
cd+++++++++ gba/
>f+++++++++ gba/Celeste 2 (v1.0) (Aftermarket).gba
>f+++++++++ gba/Celeste Classic (World) (v1.2) (Aftermarket) (Unl).gba
cd+++++++++ gg/
>f+++++++++ gg/Castle of Illusion Starring Mickey Mouse (USA, Europe, Brazil) (En).sms
>f+++++++++ gg/Chase H.Q. (USA).sms
>f+++++++++ gg/Choplifter III (USA).gg
>f+++++++++ gg/Excellent Dizzy Collection, The (Europe).sms
>f+++++++++ gg/GG Aleste (Japan) (En).gg
>f+++++++++ gg/GG Aleste 3 (Japan) (En) (Aleste Collection).gg
>f+++++++++ gg/GG Aleste II (Japan) (En) (Aleste Collection).gg
>f+++++++++ gg/Galaga 2 (Europe).gg
>f+++++++++ gg/Sonic & Tails (Japan) (En).gg
>f+++++++++ gg/Sonic & Tails 2 (Japan) (En).gg
>f+++++++++ gg/Sonic The Hedgehog (World) (Rev A).gg
>f+++++++++ gg/Sonic The Hedgehog 2 (World).gg
>f+++++++++ gg/Streets of Rage (World).gg
>f+++++++++ gg/Streets of Rage 2 (World).gg
>f+++++++++ gg/Super Space Invaders (USA, Europe).gg
>f+++++++++ gg/Tails Adventure (World) (En,Ja).gg
>f+++++++++ gg/Terminator 2 - Judgment Day (World).gg
>f+++++++++ gg/Terminator, The (USA, Europe).gg
cd+++++++++ ngc/
>f+++++++++ ngc/Bust-A-Move Pocket (USA).ngc
>f+++++++++ ngc/Crush Roller (World) (En,Ja).ngc
>f+++++++++ ngc/Fantastic Night Dreams - Cotton (Europe).ngc
>f+++++++++ ngc/Fatal Fury F-Contact - Pocket Fighting Series (World) (En,Ja).ngc
>f+++++++++ ngc/King of Fighters R-2 - Pocket Fighting Series (World) (En,Ja).ngc
>f+++++++++ ngc/Last Blade, The - Beyond the Destiny (USA, Europe).ngc
>f+++++++++ ngc/Magical Drop Pocket (USA, Europe).ngc
>f+++++++++ ngc/Rockman - Battle & Fighters (Japan).ngc
>f+++++++++ ngc/SNK Gals' Fighters (USA, Europe).ngc
>f+++++++++ ngc/SNK vs. Capcom - Card Fighters' Clash - SNK Version (USA, Europe).ngc
>f+++++++++ ngc/SNK vs. Capcom - The Match of the Millennium (World) (En,Ja).ngc
>f+++++++++ ngc/Sonic The Hedgehog - Pocket Adventure (World) (En,Ja).ngc
cd+++++++++ pce/
>f+++++++++ pce/Bomberman '93 (USA).pce
>f+++++++++ pce/Bomberman (USA).pce
>f+++++++++ pce/Chase H.Q. (USA).pce
>f+++++++++ pce/Darius Alpha (Japan) (En) (SG Enhanced).pce
>f+++++++++ pce/Darius Plus (Japan) (En) (SG Enhanced).pce
>f+++++++++ pce/Final Soldier (Japan) (En).pce
>f+++++++++ pce/Galaga '88 (Japan) (En).pce
>f+++++++++ pce/Gradius (Japan) (En).pce
>f+++++++++ pce/ImageFight (Japan) (En).pce
>f+++++++++ pce/Pac-Land (USA).pce
>f+++++++++ pce/R-Type I (Japan) (En).pce
>f+++++++++ pce/R-Type II (Japan) (En) (V1.1).pce
>f+++++++++ pce/Raiden (USA).pce
>f+++++++++ pce/Salamander (Japan) (En).pce
>f+++++++++ pce/Soldier Blade (USA).pce
>f+++++++++ pce/Space Invaders - Fukkatsu no Hi (Japan).pce
>f+++++++++ pce/Super Star Soldier (USA).pce
>f+++++++++ pce/Turrican (USA).pce
sent 3,171 bytes received 266 bytes 6,874.00 bytes/sec
total size is 54,620,304 speedup is 15,891.85 (DRY RUN)
Once we’re happy that our command is going to do what we intend it to do, we can remove the -n switch to make the initial backup:
[simon@computer 14:38:40] ~/tmp
$ rsync -avi Games/ Games-backup
sending incremental file list
created directory Games-backup
cd+++++++++ ./
cd+++++++++ gb/
>f+++++++++ gb/A-mazing Tater (USA).gb
>f+++++++++ gb/Adventures of Lolo (Europe) (SGB Enhanced).gb
>f+++++++++ gb/Adventures of Star Saver, The (USA, Europe).gb
>f+++++++++ gb/Kirby's Block Ball (USA, Europe) (SGB Enhanced).gb
>f+++++++++ gb/Kirby's Dream Land (USA, Europe).gb
>f+++++++++ gb/Kirby's Dream Land 2 (USA, Europe) (SGB Enhanced).gb
>f+++++++++ gb/Kirby's Pinball Land (USA, Europe).gb
>f+++++++++ gb/Kirby's Star Stacker (USA, Europe) (SGB Enhanced).gb
>f+++++++++ gb/Wario Blast Featuring Bomberman! (USA, Europe) (SGB Enhanced).gb
>f+++++++++ gb/Wario Land - Super Mario Land 3 (World).gb
>f+++++++++ gb/Wario Land 3 (World) (En,Ja).gbc
>f+++++++++ gb/Wario Land II (USA, Europe) (SGB Enhanced) (GB Compatible).gbc
>f+++++++++ gb/Yoshi (USA).gb
>f+++++++++ gb/Yoshi's Cookie (USA, Europe).gb
cd+++++++++ gba/
>f+++++++++ gba/Celeste 2 (v1.0) (Aftermarket).gba
>f+++++++++ gba/Celeste Classic (World) (v1.2) (Aftermarket) (Unl).gba
cd+++++++++ gg/
>f+++++++++ gg/Castle of Illusion Starring Mickey Mouse (USA, Europe, Brazil) (En).sms
>f+++++++++ gg/Chase H.Q. (USA).sms
>f+++++++++ gg/Choplifter III (USA).gg
>f+++++++++ gg/Excellent Dizzy Collection, The (Europe).sms
>f+++++++++ gg/GG Aleste (Japan) (En).gg
>f+++++++++ gg/GG Aleste 3 (Japan) (En) (Aleste Collection).gg
>f+++++++++ gg/GG Aleste II (Japan) (En) (Aleste Collection).gg
>f+++++++++ gg/Galaga 2 (Europe).gg
>f+++++++++ gg/Sonic & Tails (Japan) (En).gg
>f+++++++++ gg/Sonic & Tails 2 (Japan) (En).gg
>f+++++++++ gg/Sonic The Hedgehog (World) (Rev A).gg
>f+++++++++ gg/Sonic The Hedgehog 2 (World).gg
>f+++++++++ gg/Streets of Rage (World).gg
>f+++++++++ gg/Streets of Rage 2 (World).gg
>f+++++++++ gg/Super Space Invaders (USA, Europe).gg
>f+++++++++ gg/Tails Adventure (World) (En,Ja).gg
>f+++++++++ gg/Terminator 2 - Judgment Day (World).gg
>f+++++++++ gg/Terminator, The (USA, Europe).gg
cd+++++++++ ngc/
>f+++++++++ ngc/Bust-A-Move Pocket (USA).ngc
>f+++++++++ ngc/Crush Roller (World) (En,Ja).ngc
>f+++++++++ ngc/Fantastic Night Dreams - Cotton (Europe).ngc
>f+++++++++ ngc/Fatal Fury F-Contact - Pocket Fighting Series (World) (En,Ja).ngc
>f+++++++++ ngc/King of Fighters R-2 - Pocket Fighting Series (World) (En,Ja).ngc
>f+++++++++ ngc/Last Blade, The - Beyond the Destiny (USA, Europe).ngc
>f+++++++++ ngc/Magical Drop Pocket (USA, Europe).ngc
>f+++++++++ ngc/Rockman - Battle & Fighters (Japan).ngc
>f+++++++++ ngc/SNK Gals' Fighters (USA, Europe).ngc
>f+++++++++ ngc/SNK vs. Capcom - Card Fighters' Clash - SNK Version (USA, Europe).ngc
>f+++++++++ ngc/SNK vs. Capcom - The Match of the Millennium (World) (En,Ja).ngc
>f+++++++++ ngc/Sonic The Hedgehog - Pocket Adventure (World) (En,Ja).ngc
cd+++++++++ pce/
>f+++++++++ pce/Bomberman '93 (USA).pce
>f+++++++++ pce/Bomberman (USA).pce
>f+++++++++ pce/Chase H.Q. (USA).pce
>f+++++++++ pce/Darius Alpha (Japan) (En) (SG Enhanced).pce
>f+++++++++ pce/Darius Plus (Japan) (En) (SG Enhanced).pce
>f+++++++++ pce/Final Soldier (Japan) (En).pce
>f+++++++++ pce/Galaga '88 (Japan) (En).pce
>f+++++++++ pce/Gradius (Japan) (En).pce
>f+++++++++ pce/ImageFight (Japan) (En).pce
>f+++++++++ pce/Pac-Land (USA).pce
>f+++++++++ pce/R-Type I (Japan) (En).pce
>f+++++++++ pce/R-Type II (Japan) (En) (V1.1).pce
>f+++++++++ pce/Raiden (USA).pce
>f+++++++++ pce/Salamander (Japan) (En).pce
>f+++++++++ pce/Soldier Blade (USA).pce
>f+++++++++ pce/Space Invaders - Fukkatsu no Hi (Japan).pce
>f+++++++++ pce/Super Star Soldier (USA).pce
>f+++++++++ pce/Turrican (USA).pce
sent 54,639,115 bytes received 1,310 bytes 109,280,850.00 bytes/sec
total size is 54,620,304 speedup is 1.00
Make sure to include the trailing slash after the source directory otherwise rsync will copy the Games directory as well (which is not what we want):
[simon@computer 14:46:29] ~/tmp
$ rsync -navi Games Games-backup
sending incremental file list
cd+++++++++ Games/
cd+++++++++ Games/gb/
>f+++++++++ Games/gb/A-mazing Tater (USA).gb
>f+++++++++ Games/gb/Adventures of Lolo (Europe) (SGB Enhanced).gb
>f+++++++++ Games/gb/Adventures of Star Saver, The (USA, Europe).gb
>f+++++++++ Games/gb/Kirby's Block Ball (USA, Europe) (SGB Enhanced).gb
>f+++++++++ Games/gb/Kirby's Dream Land (USA, Europe).gb
>f+++++++++ Games/gb/Kirby's Dream Land 2 (USA, Europe) (SGB Enhanced).gb
>f+++++++++ Games/gb/Kirby's Pinball Land (USA, Europe).gb
>f+++++++++ Games/gb/Kirby's Star Stacker (USA, Europe) (SGB Enhanced).gb
>f+++++++++ Games/gb/Wario Blast Featuring Bomberman! (USA, Europe) (SGB Enhanced).gb
>f+++++++++ Games/gb/Wario Land - Super Mario Land 3 (World).gb
>f+++++++++ Games/gb/Wario Land 3 (World) (En,Ja).gbc
>f+++++++++ Games/gb/Wario Land II (USA, Europe) (SGB Enhanced) (GB Compatible).gbc
>f+++++++++ Games/gb/Yoshi (USA).gb
>f+++++++++ Games/gb/Yoshi's Cookie (USA, Europe).gb
cd+++++++++ Games/gba/
>f+++++++++ Games/gba/Celeste 2 (v1.0) (Aftermarket).gba
>f+++++++++ Games/gba/Celeste Classic (World) (v1.2) (Aftermarket) (Unl).gba
cd+++++++++ Games/gg/
>f+++++++++ Games/gg/Castle of Illusion Starring Mickey Mouse (USA, Europe, Brazil) (En).sms
>f+++++++++ Games/gg/Chase H.Q. (USA).sms
>f+++++++++ Games/gg/Choplifter III (USA).gg
>f+++++++++ Games/gg/Excellent Dizzy Collection, The (Europe).sms
>f+++++++++ Games/gg/GG Aleste (Japan) (En).gg
>f+++++++++ Games/gg/GG Aleste 3 (Japan) (En) (Aleste Collection).gg
>f+++++++++ Games/gg/GG Aleste II (Japan) (En) (Aleste Collection).gg
>f+++++++++ Games/gg/Galaga 2 (Europe).gg
>f+++++++++ Games/gg/Sonic & Tails (Japan) (En).gg
>f+++++++++ Games/gg/Sonic & Tails 2 (Japan) (En).gg
>f+++++++++ Games/gg/Sonic The Hedgehog (World) (Rev A).gg
>f+++++++++ Games/gg/Sonic The Hedgehog 2 (World).gg
>f+++++++++ Games/gg/Streets of Rage (World).gg
>f+++++++++ Games/gg/Streets of Rage 2 (World).gg
>f+++++++++ Games/gg/Super Space Invaders (USA, Europe).gg
>f+++++++++ Games/gg/Tails Adventure (World) (En,Ja).gg
>f+++++++++ Games/gg/Terminator 2 - Judgment Day (World).gg
>f+++++++++ Games/gg/Terminator, The (USA, Europe).gg
cd+++++++++ Games/ngc/
>f+++++++++ Games/ngc/Bust-A-Move Pocket (USA).ngc
>f+++++++++ Games/ngc/Crush Roller (World) (En,Ja).ngc
>f+++++++++ Games/ngc/Fantastic Night Dreams - Cotton (Europe).ngc
>f+++++++++ Games/ngc/Fatal Fury F-Contact - Pocket Fighting Series (World) (En,Ja).ngc
>f+++++++++ Games/ngc/King of Fighters R-2 - Pocket Fighting Series (World) (En,Ja).ngc
>f+++++++++ Games/ngc/Last Blade, The - Beyond the Destiny (USA, Europe).ngc
>f+++++++++ Games/ngc/Magical Drop Pocket (USA, Europe).ngc
>f+++++++++ Games/ngc/Rockman - Battle & Fighters (Japan).ngc
>f+++++++++ Games/ngc/SNK Gals' Fighters (USA, Europe).ngc
>f+++++++++ Games/ngc/SNK vs. Capcom - Card Fighters' Clash - SNK Version (USA, Europe).ngc
>f+++++++++ Games/ngc/SNK vs. Capcom - The Match of the Millennium (World) (En,Ja).ngc
>f+++++++++ Games/ngc/Sonic The Hedgehog - Pocket Adventure (World) (En,Ja).ngc
cd+++++++++ Games/pce/
>f+++++++++ Games/pce/Bomberman '93 (USA).pce
>f+++++++++ Games/pce/Bomberman (USA).pce
>f+++++++++ Games/pce/Chase H.Q. (USA).pce
>f+++++++++ Games/pce/Darius Alpha (Japan) (En) (SG Enhanced).pce
>f+++++++++ Games/pce/Darius Plus (Japan) (En) (SG Enhanced).pce
>f+++++++++ Games/pce/Final Soldier (Japan) (En).pce
>f+++++++++ Games/pce/Galaga '88 (Japan) (En).pce
>f+++++++++ Games/pce/Gradius (Japan) (En).pce
>f+++++++++ Games/pce/ImageFight (Japan) (En).pce
>f+++++++++ Games/pce/Pac-Land (USA).pce
>f+++++++++ Games/pce/R-Type I (Japan) (En).pce
>f+++++++++ Games/pce/R-Type II (Japan) (En) (V1.1).pce
>f+++++++++ Games/pce/Raiden (USA).pce
>f+++++++++ Games/pce/Salamander (Japan) (En).pce
>f+++++++++ Games/pce/Soldier Blade (USA).pce
>f+++++++++ Games/pce/Space Invaders - Fukkatsu no Hi (Japan).pce
>f+++++++++ Games/pce/Super Star Soldier (USA).pce
>f+++++++++ Games/pce/Turrican (USA).pce
sent 3,187 bytes received 232 bytes 6,838.00 bytes/sec
total size is 54,620,304 speedup is 15,975.52 (DRY RUN)
Now that we’ve run rsync and copied all our games to our backup folder, running the same command again should not produce any changes. Let’s check:
[simon@computer 14:55:15] ~/tmp
$ rsync -avi Games/ Games-backup
sending incremental file list
sent 2,957 bytes received 17 bytes 5,948.00 bytes/sec
total size is 54,620,304 speedup is 18,365.94
rsync hasn’t done anything by the looks of it, which is as we expect. Now, lets add a couple of new games to our source folder. We’re in the mood for a bit of hockey so we’ll add two games, one Gameboy game, one Game Gear one. Let’s see if rsync spots them:
[simon@computer 14:55:20] ~/tmp
$ rsync -navi Games/ Games-backup
sending incremental file list
.d..t...... gb/
>f+++++++++ gb/NHL Blades of Steel (USA).gbc
.d..t...... gg/
>f+++++++++ gg/NHL All-Star Hockey (USA).gg
sent 3,040 bytes received 29 bytes 6,138.00 bytes/sec
total size is 56,193,168 speedup is 18,309.93 (DRY RUN)
It sure did! Let’s have rsync add them to our backup directory:
[simon@computer 15:00:19] ~/tmp
$ rsync -avi Games/ Games-backup
sending incremental file list
.d..t...... gb/
>f+++++++++ gb/NHL Blades of Steel (USA).gbc
.d..t...... gg/
>f+++++++++ gg/NHL All-Star Hockey (USA).gg
sent 1,576,360 bytes received 69 bytes 3,152,858.00 bytes/sec
total size is 56,193,168 speedup is 35.65
I really like the -i option, as we can see exactly what rsync has done.
What about files I’ve deleted?
If you’re trying to manage a backup directory manually, it can be a lot of work, keeping track of files and folders added, modified and deleted. rsync has a handy --delete option which will delete files from the destination folder that aren’t in the source folder. For our example use case in this post about managing our retro game library backups, we may have a rom that doesn’t work. So we’d like it gone from both folders.
We decide to get rid of a Wario game and a Turrican game. These have already been backed up, but the --delete option tells rsync to delete anything that’s in the destination folder, but not in the source folder. Let’s run rsync in test mode:
[simon@computer 15:16:04] ~/tmp
$ rsync -navi --delete Games/ Games-backup
sending incremental file list
*deleting gb/Wario Blast Featuring Bomberman! (USA, Europe) (SGB Enhanced).gb
*deleting pce/Turrican (USA).pce
.d..t...... gb/
.d..t...... pce/
sent 2,942 bytes received 120 bytes 6,124.00 bytes/sec
total size is 55,668,880 speedup is 18,180.56 (DRY RUN)
So now, I’m happy that the command:
$ rsync -avi --delete Games/ Games-backup/
is going to backup anything newly added, and delete any games that I deliberately deleted. By the way, rsync also keeps track of modified files. So if you replace a game with another one shaing exactly the same name (but different contents), rsync will copy that one to your backup folder too.
Conclusion
I think rsync is the perfect program for managing a backup of your games / roms. You only have one folder that you need to keep tidy and rsync will keep a perfect duplicate of that folder for you.
A lot of people (myself included) may have had some fear of using rsync for this sort of task but once you’ve tried it on a test directory and dialled in your options, I don’t tnink anything can beat it.