Photo albums: How to deal with that beast

If you are like me, you probably have a ton of photos from your escapades, significant moments of your life. Some photos are more important, some can be deleted, some you don’t even want to see (for whatever reason). In a perfect world I would review all those photos regularly, keep just a few and make sure they are somewhere secured. Yes, in a perfect world. In reality, I do not do that, my family (which produces much more photos) do not do that, probably most of the world does not do that. So we end up keeping  those photos forever (or until the moment we are ordering them – which again means forever). Beside the required unlimited space in addition it would be nice to have photos organized by date it was created (folder, timeline etc), easy to sort, have a face or place recognition (AI) and some additional tags, for example with info on where that photos was taken. So basically, all you have when using Google or Apple photo services. Alright, so if there are so easy to use services, merged to your phone software, why this article, right? Well, because of the reason I already mentioned, photos are growing infinitely and we want to keep copies of the data in a secure place. I am not going to argue that maintaining data in the cloud is a privacy or security issue for the reason that privacy no one really cares (which is not necessarily true, but people trust clouds more than governments and it is cloud business to not share stored photos – publicly). When it comes to the security, I am sure that Cloud is much more frequently updated, tested and certified than your home network (mine for sure). Of course Google/Apple services are comfortable for the reason that those are already installed and well integrated into the phone system. In addition the pictures are visible across all devices which is fantastic.  So again, what is the problem?

Let’s start with:

  • ready to use cloud services are quite expensive (check price for 1 TB and more)
  • you rely on one provider
  • keeping photos in phone memory and in cloud photos service is not a real backup, delete option is also replicated by default 

In overall, managing photos reminds the process and dilemma that happens in enterprise. The big companies are struggling with maintaining big portions of data, and how to effectively manage them. With small difference, in enterprise the problem is being solved by the group of experts and some $$$$, at home you are the expert and the budget is $ 😀

Anyway, let’s keep it simple just with couple of definition from IT field:

  • data backup and recovery means crating data copy/restoring from that copy of data to your computer
  • redundancy means to keep the same data copy on several drives and/or several locations (disaster recovery, business continuity .. please ignore that)
  • data archiving: storing data for a longer (usually) on the cheapest possible drives
  • data integrity, backuped or archived data shouldn’t be changed at any stage

Easy, right? Well in reality to maintain photos you will have to make some choices from the areas like technology decision process, resource governance (well some of them), architecture and risk management.  Do not want to bore you to death so just few conclusion what I (and probably you) want to achieve:

  • keep data outside home cuz basically your home can have natural disaster (like fire or Police ;), both won’t care about you disks, “war” also won’t probably care about your privacy and could harm your drive)
  • have an archive and not only synchronized copy  (again, in Cloud delete operation is also synchronized)
  • have a fairly easy was to operate (“keep it simple and stuped” rule wherever possible)
  • minimize cost
  • keep the data (I mean photos) in organized way (time when the photo was taken is ok for me)

Let’s for the moment discuss Cloud storages. There are two main options, services dedicated to store photos and generic cloud storage. First option discussed already has two services worth mentioning, Google Photos with unlimited space for “low” quality photos and Amazon Photos (https://www.amazon.com/Amazon-Photos/b?ie=UTF8&node=13234696011) which unlimited option is included with Amazon Prime (as of April, 2024). In addition to the potential issue (being not a backup) – if something is free, it will probably die in some (near) future. Can you remember the time when Google Photos for the best quality was not limited or the time when from QNAP you were able to sync your photos with Amazon Photos? Well – those are not available anymore, right? (always good to learn from the history??)
The second option is a generic cloud disk you can use for everything. Search for cloud backup that will meet your expectations (as an example, https://www.backblaze.com/cloud-backup/pricing). Just check if all options are available in your country.
sidenote: no one is paying me for that article, just backblaze service looks very popular when I was researching a few forums. These kinds of services are quite a lot. Remember, beside the price, check where such service is provided, company comes from and where your data will be kept. Is that a democratic country? If you trust Chinese or India that’s ok as long as you’re comfortable with it. Also check if software for synchronization is available for your phone/laptop. 

Another very cheap solution would be to use Azure Glacier. In fact, many cloud storage providers in the background are using AWS S3 disk flavors. If you are considering that path just verify what are the opinions and costs for retrieving the data back to your laptop or ec2 instance when necessary. That cost can be quite high, comparing to just data store.

So, what are the options:

  1. Let’s start with the easiest one: external disk drive + cloud storage. In that scenario your photos will be treated as “regular” data, which is fine but most probably you wont get face recognition (or any other AI) plus you will have to take care of ordering the data (in separate directories)
    External disk is really up to you, just check the interface to be compatible with your laptop. Also check the interface speed. Cloud storage can cost like 100$+/year so it is not the cheapest possible option.
    Important, as an external drive, do not use old disks, in general old equipment to maintain the backup data. If you think that will save you money, just rethink again and answer the question how backup data are precious to you 
  2. Copy photos to the drive that will be kept in your family/friend’s house, a couple (or more the best) kilometers from your home. Surprisingly, it is not entirely a foolish choice. You can buy 1-2TB external spinning drives at quite a good price, feel it up with the pictures and drive it to “remote location” at the earliest opportunity. 
    Also store the original data to a second (or more) external drive at your home. 
    It will be more likely a one time action (I mean, you will never update the data on that disk). But I would say, for many that would be the cheapest option (but of course with a lot of limitations)
  3. Next option would be actually very similar to the first and second one. With the difference that instead of having an external disk you can use NAS devices like QNAP or Synology (or any other you trust). I have been using QNAP for several years now without serious issues and actually the QNAP software is quite good (just try to keep it up to date as there were some serious security issues in the past and  never, ever expose it to the Internet. Instead you can use myQnapCloud or similar) QNAP has many advantages compared to the external single drive: it is comfortable to use and has the possibility to build RAID on several physical drives – so even if you lose one disk, you will still have access to your data. There’s a fly in the ointment, you can lose all QNAP for plenty of reasons, so anyway, the second disk (at your friend’s place) or cloud storage is still needed.

If you want and can store data on some exotic device (like an old tape drive) that you have for whatever reason just rethink that again. What will happen in the next few years when it comes to restoring the data and your device is no longer with you or it is broken. Will you be able to buy a new one (even on the second market??) When it comes to archiving you need to think from the perspective of the next few years. 

In case you don’t want to extend your Google/iCloud drive, you have an option to export all of your photos at one step and even if it takes several days to get the data it is usually the most convenient step: try to follow https://support.google.com/accounts/answer/3024190?hl=en or https://support.apple.com/en-us/118257 or from iCloud web, go to your account (Manage Apple ID) -> privacy (left hand site of the screen) -> your data (manage your data) -> obtain copy of your data
You can download your data as a one or more compressed archive file and then delete them from your cloud drive.

Conclusion:

Photos are not easy at all 😀 Photos are important, photos depict your history. Managing phots can be fun, can be a reason to improve your skills in IT. But on the other hand can be costly and a source of frustration if something goes wrong. So be patient, be prepared and have a good plan. And, how are you managing your photos? Please leave me a comment.

Below you can find a python script for disk organization based on the data included in every photo (if such options -exif- was not disabled, mostly it is not).

import os
import subprocess
from datetime import datetime
import shutil

def extract_creation_date(file_path):
    try:
        # Run ExifTool to extract creation date
        result = subprocess.run(['exiftool', '-CreateDate', '-s', '-s', '-s', file_path], capture_output=True, text=True)

        if result.returncode == 0:
            creation_date_str = result.stdout.strip()
            creation_date = datetime.strptime(creation_date_str, "%Y:%m:%d %H:%M:%S")
            return creation_date
        else:
            print(f"ExifTool returned non-zero exit code for file: {file_path}")
            return None
    except Exception as e:
        print(f"Error extracting creation date for file: {file_path} - {e}")
        return None

def move_files_based_on_creation_date(source_dir, destination_dir):
    # Recursively iterate through each file and directory in the source directory
    for root, dirs, files in os.walk(source_dir):
        for filename in files:
            # Construct the full path to the file
            file_path = os.path.join(root, filename)
            # Extract creation date using ExifTool
            creation_date = extract_creation_date(file_path)
            if creation_date:
                # Create directory based on year and month
                directory_name = creation_date.strftime("%Y-%m")
                directory_path = os.path.join(destination_dir, directory_name)
                if not os.path.exists(directory_path):
                    os.makedirs(directory_path)
                # Move the file to the new directory while preserving creation date
                new_file_path = os.path.join(directory_path, filename)
                shutil.move(file_path, new_file_path)
                # Set the creation date of the new file to match the original creation date
                os.utime(new_file_path, (os.path.getatime(new_file_path), creation_date.timestamp()))
                print(f"Moved {filename} to {directory_name} (Original creation date preserved)")
            else:
                print(f"Skipping {filename}: Unable to extract creation date")

# Example usage
source_directory = "/mnt/original"
destination_directory = "/mnt/sorted"
move_files_based_on_creation_date(source_directory, destination_directory)
No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Uncategorized
Create Pages document in Finder (macOS + automator)

As you most probably know, in macOS you can use automation to run repeatable tasks. Automator requires little bit scripting so the task is not necessary to be done by everyone, but lots of users can find it extremely useful. In addition It is always possible to run AI to …

Uncategorized
Export your data from iCloud (for archive and other purposes)

It is always a little bit tricky for me to find where to download all my data from iCloud in case I want to archive them at my home disk, or basically I want to remove some of my data from iCloud to avoid additional fee for cloud storage space. …

Azure
Why Firefox is important and people should use this browser in 2024, my thoughts.

Can you remember the times when everyone was using Internet Explorer? Back in the ’90s and the early part of this century, Internet Explorer dominated the browser market. Software Incompatibility with Other Browsers Incompatibility issues with software and other browsers have been a persistent problem. Even in 2022, this remains …