Thursday, August 23, 2012

Backing up your photos while traveling

Photo backup strategy, for the geeks (Updated, post-trip):

There are variations of the saying, "If a file doesn't exist in at least two places, it doesn't really exist," but the idea is common.  I'll be trying to make sure my pictures really exist, using an updated version of the backup strategy I have used on previous trips.

The three threats to my data that I need to protect against are: mistakes, hardware failure, and theft/loss.  The last two are really just a combination of care and luck.  Mistakes are the most likely, and the trickiest to protect against.
 

Delete this at night, on the computer
My first defense against mistakes is a simple practice: never, ever delete an image from the camera itself.  I will wait until it's backed up, and I can review it on a larger display to be really sure I don't want it.  It may not actually be out of focus like it appeared to be on the camera; it may be soft, but your only usable shot of the scene.  Or I may simply have meant to delete the picture of my shoes, and instead deleted the one of Jackie Onassis, Bigfoot and the Lochness monster posed together.  Deleting on the camera will go badly--it's just a question of when.  I make sure I have enough memory card space that I never need to, and then I'm also not wasting daylight hours looking at the back of my camera when other neat stuff is visible.




Shoot RAW
My second defense against mistakes is shooting in RAW (not the primary reason, but it's a great perk!).  There are no issues with preserving a pristine original, to avoid generation edit artifacts from re compressing in JPEG; and I don't end up cropping my original, and then having that crop propagated to all of my backups, and no original full-size image left.  Non-destructive editing in RAW eliminates a whole class of mistakes that are really easy to make.
After those two, I'm relying on redundancy--keep it in multiple locations, and don't propagate deletes with backups.

Since I'm shooting in RAW, cloud backup isn't feasible--I'll be producing too much data for the kind of bandwidth that will be available.  Based on the number of pictures I have taken on previous trips, I'm expecting to shoot roughly 750GB in the next year (update: we ended up with 528GB, in 34,000 pictures).  Assuming a generous 256Kbps upload, I'd need to be online 20 hours a day to back up that quantity.  Instead, I'll be using a series of 2.5"  drives, which are very light and portable, and in smaller capacities, reasonably cheap.



Drives X, W and S
To simplify the description, my destinations:
F1 - F4 are my four flash memory cards
C: is my internal drive, a 500GB drive, which is the largest 9mm 2.5" drive currently available (the Lenovo x220 is slim, and will not accept the more common 11mm drive).
S: is my primary storage, a 1TB USB 3.0 drive (silicon Power A80)
W: is my primary backup, a 1TB USB 2.0 drive (Western Digital Elements SE)
X: is one of several small capacity (cheap) secondary backup drives, which are just bare 2.5" SATA drives in (cheap) plastic shock/water resistant sleeves

Importing
The routine:
When possible, each night I will remove the F1 card from my camera, and insert the F2 card into the camera, and immediately* format F2.  I'll import F1 into Lightroom on the laptop, and the import process will copy the images to S: and also to a temporary backup location on C: at the same time.  Then I will place the F1 card back in the card wallet, still with all of the images on it.  At this point the images are in three locations, but two of them (C: and F1) are temporary.
Once the import is done, I will connect the W: drive, and run the robocopy script to backup S: to W:  It's important to note that the backup only copies new or changed content from S: to W:, it does not mirror deletions.  If I delete an image on S:, by mistake or not, that image will still exist on W: and X:.  This is an important safeguard against mistakes.  If I used the MIRROR option in robocopy (or similar parameter in any other command), I would be replicating my mistakes to my backups, in exchange for saving a tiny amount of space.  That is not a good trade.
At this point, the images exist in four locations, and it is now safe to format F1 in the normal rotation of the four flash cards, though this probably won't happen until four days from now.
Weekly, I will connect the current X: drive, and run a different, incremental script to backup S: to X:.  I will also clear out the temporary backup location on C:, since that will eventually run out of space otherwise, and the images are already in three permanent locations (S, W & X).
When the X: drive is nearly full, or when it's convenient, I will ship it home, so I will have a copy of most of our images even if we lose all our bags.  Before starting to use the next X: drive, I will use Lightroom to move all of the images from S:\Pictures\YYYY\ to S:\Archived\YYYY.  The full backup to W: copies from both of those folders (merging them to a single location on W:), but the incremental only copies from the S:\Pictures\ folder, so the next X: drive will not have any overlap with the previous one (conserving space on these small drives).  At the same time, in Lightroom, I will also permanently delete all images marked as rejects (waiting until now insures they are backed up on W and the prior X: drive, in case I later discover I rejected the wrong photo/s).

(*An updated note on formatting a rotation of cards: when you're shooting a lot (like 30K images), it's important to remember to format the card as soon as you rotate it into the camera.  If you just rolled over 9999 images on your F1 card, and your most recent shot is named IMG_0257, but you're inserting F2 which has a most recent shot of IMG_9412, your camera will try to be smart, and it will name your next shot IMG_9413.  If you don't care about such things, you probably stopped reading after the first paragraph; for the rest of you, fixing this is not how you want to spend an evening in some exotic location where you could be seeing/eating/experiencing something really neat.  Instead, make it a habit to insert a card, display the first image on the card, in-camera, double check that you do already have that image in Lightroom/whatever you import to, and then format that card, right then.  Pain averted.)

Do I fit in?


Speaking of bags, the C, S, W and X drives will each be kept in separate bags (we each have a backpack and a carry-on bag), so we won't lose pictures if we lose a bag.

The backup scripts I'm using are very simple.  The most complicated part is generating a date-time stamped log file for each backup, which is almost certainly overkill, but it's fun to keep my scripting skills in use, and it does provide a very detailed (but tiny, in terms of disk space) record of your backups, in case you need it in the future.








Full Backup batch file:
REM Modified log datestamp from http://stackoverflow.com/questions/5329414/generating-managable-log-files-on-a-batch-file-job
REM Truncates localdatetime to 14 characters (year through seconds)
for /f "skip=1" %%d in ('wmic os get localdatetime') do if not defined MyDate set MyDate=%%d
set Filename=W:\Logs\BackupLog_%MyDate:~0,14%.txt
REM Copy, recursing folders, no retry, no wait, logging with datestamp
robocopy S:\Pictures W:\Pictures /S /R:0 /W:0 /LOG:%Filename%
REM Copy any archived pictures to single location on W:
robocopy S:\Archived W:\Pictures /S /R:0 /W:0 /LOG+:%Filename%

The incremental Backup script is identical, other than destination drive, and omitting the last two lines to copy S:\Archived\.

No comments:

Post a Comment