Photo archiving
I tried several methods of saving digital photos for long-term storage. Below is the approach I've settled on, and it's worked for me since 2001. Note: I'm using the Linux operating system, and downloading photos using a Compact Flash card reader. I'm also using an SQL database, and the perl programming language.Save ALL your images
As one example, I photographed several dozen kids for months in the Philippines, after which one of the children died in a handgun accident. Otherwise unremarkable photos of the boy were now very important to me and his family (one rode on his hearse in his funeral procession, see photo).
Save files in folders named for the date using year-month-day ("2007-12-21")
This gives a directory structure with a natural sorting order, that looks like this:
/2000
|
+----2000-01-01
2000-02-01
2000-03-01
...
/2001
|
+----2001-01-01
2001-02-01
2001-03-01
...
etc.
Each image is downloaded into a folder named for the date it was taken on, according to the photo's EXIF information. I wrote a perl script that reads the EXIF data from images, creates any necessary folders, and copies the images. It uses a utility called "jhead", and is not very elegant but an excerpt is below:
#mount the flash card reader (this will be different for your system)
system("mount -t vfat /dev/sdd1 /mnt/flash")
#the below is based on Canon's particular directory structure
@files = glob("/mnt/flash/dcim/???canon/*");
foreach $filename(@files) {
$out = `jhead $filename`;
#the jhead command will return, in part, the following:
#Date/Time : 2005:08:18 02:16:53
$out =~ /Date\/Time.*(\d\d\d\d:\d\d:\d\d) /;
$date_taken=$1;
$date_taken =~ s/:/-/g;
$date_taken =~ /(\d\d\d\d)/;
$year_taken = $1;
unless(-e "/digicam/$year_taken/$date_taken/") {
system("mkdir /digicam/$year_taken/$date_taken");
}
system("cp -v $filename /digicam/$year_taken/$date_taken/");
}
The same thing can be done by hand, if necessary.
Use an SQL database to keep track of your original image files
+--------------+-----------------------+------+-----+------------+ | Field | Type | Null | Key | Default | +--------------+-----------------------+------+-----+------------+ | id | mediumint(8) unsigned | NO | PRI | NULL | | folder | date | NO | MUL | 0000-00-00 | | filename | varchar(100) | NO | | | | archive_no | tinyint(3) unsigned | YES | | NULL | +--------------+-----------------------+------+-----+------------+The important function of this table is that whatever I may do down the road with a given image, I always associate it with it's "file id number". The need for this is apparent from the filename scheme for Canon, "img_0000.jpg"; if you let the camera name your images with this naming scheme, after shooting 10,000 images you begin re-using filenames (you have two "img_0001.jpg", etc.). So I don't track images by filenames, or dates, or a combination, but a single, unique file id number.
Make backups
When there are enough images not backed up that would fill a DVD, I make a new backup and update the files table to reflect which images are on that backup disc.
I haven't lost my original archive due to fire, theft, or catastrophic system failure yet, but I'm ready for it when it happens. I try to keep my backup in a separate location from my original archive, but they are in the same building (in a coal bin, which seems fire proof).
