Advertisements

Copying Action Camera Video: Now With UUIDs

Having tired of manually decoding UDEV’s essentially random device names produced for the various USB action cameras and card readers, I put the device UUIDs in /etc/fstab and let the device names fall where they may:

UUID=B40C6DD40C6D9262	/mnt/video	ntfs	noauto,uid=ed 0 0
UUID=0FC4-01AB	/mnt/Fly6	vfat	noauto,nodiratime,uid=ed	0	0
UUID=0000-0001	/mnt/M20	vfat	noauto,nodiratime,uid=ed	0	0
LABEL=AS30V	/mnt/AS30V	exfat	noauto,nodiratime,uid=ed	0	0

You get those by plugging everything in, running blkid, and sorting out the results.

The 64 GB MicroSD card from the Sony AS30V camera uses Microsoft’s proprietary exfat file system, which apparently doesn’t associate a UUID/GUID with the entire device, so you must use a partition label. The Official SD Card Formatter doesn’t (let you) set one, so:

exfatlabel /dev/sdd1 AS30V

It turns out you can include spaces in the partition label, but there’s no way to escape them (that I know of) in /etc/fstab, so being succinct counts for more than being explanatory.

One could name the partition in the Windows device properties pane, which would make sense if one knew it was necessary while the Token Windows Laptop was booted with the card in place.

I think this is easier then trying to persuade UDEV to create known device names based on the USB hardware characteristics, because those will depend on which USB card / device / reader I use. I can force the UUIDs to be whatever I want, because they’re just bits in the disk image.

With all that in place, you plug in All. The. Gadgets. and run the script (as seen below). The general idea is to verify the bulk video drive mounted OK, attempt to mount each memory card and fire off a correspondingĀ rsync copy, wait until they’re all done, tidy the target filenames, then delete all the source files to get ready for the next ride.

Funneling all three copies to a single USB hard drive probably isn’t the smartest thing, but the overall write ticks along at 18 MB/s, which is Good Enough for my simple needs. If the drive thrashes itself to death, I won’t do it again; I expect it won’t fail until well outside the 1 year limited warranty.

If any of the rsync copies fail, then nothing gets deleted. I’m a little queasy about automagically deleting files, but it’s really just video with very little value. Should something horrible happen, I’d do the copies by hand, taking great care to not screw up.

After all, how many pictures like this do we need?

Ed signalling on Raymond

Ed signalling on Raymond

The Bash script as a GitHub Gist:

Advertisements

  1. #1 by scruss2 on 2018-07-17 - 11:17

    You can escape spaces in fstab using octal notation (\040), but probably best to avoid doing it at all

    • #2 by Ed on 2018-07-17 - 11:41

      Aaaannnnd documented nowhere I could find: yessir, avoid at all costs!

  2. #3 by RCPete on 2018-07-17 - 12:36

    I repurposed the USB drive from a Win 7 backup in December. It’s been running rsnapshot twice a day since the beginning of December, so far with no trouble. There’s a couple of spare drives, just in case… I did have one glitch in the April monthly backup, when the machine was off for several days while I on a medical adventure. It’s supposed to back up /usr, /home, /etc and /var, but it only got /usr in that monthly. No idea why. That’s the only odd backup in the batch.

Spam comments vanish. Comment moderation may cause a delay.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s