Skip to content

photo-backup-v2.0.0

Choose a tag to compare

@jmerhar jmerhar released this 01 Sep 08:23
· 251 commits to main since this release

Photo Backup v2.0 Release Notes

This is a major update that significantly enhances the script's flexibility and user experience. This version introduces support for an arbitrary number of backup sources and adds an automatic migration process to help users upgrade seamlessly from older versions.

✨ New Features

  • Support for Multiple Backup Sources: The biggest change in this release is the removal of the two-source limitation. You can now back up photos from one, two, or as many source directories as you need. The script has been refactored to handle any number of sources, applying the same intelligent protection logic to prevent data loss during merges.
  • Automatic Configuration Migration: To handle the breaking change in the configuration file, the script now includes a "self-healing" mechanism. When it detects an old photo-backup.conf file using the deprecated SRC_1 and SRC_2 variables, it will:
    1. Automatically create a backup of your old configuration (photo-backup.conf.bak).
    2. Rewrite the configuration file to use the new SOURCES array format.
    3. Provide helpful error messages, suggesting sudo if it encounters permission issues.

💥 Breaking Changes

This release introduces fundamental changes to how source directories are configured.

  • Configuration File: The SRC_1 and SRC_2 variables in photo-backup.conf are now deprecated. They have been replaced by a single Bash array named SOURCES.
    • Old format: SRC_1="/path/one"
    • New format: SOURCES=("/path/one" "/path/two")
  • Command-Line Flags: The -1 and -2 flags for specifying sources have been removed. They are replaced by a single, repeatable -s flag.
    • Old format: ./photo-backup.sh -1 /path/one -2 /path/two
    • New format: ./photo-backup.sh -s /path/one -s /path/two

✅ How to Upgrade

For most users, the upgrade process will be automatic. The next time you run the script after updating, it will detect your old configuration and migrate it for you. However, we strongly recommend that you:

  1. Review the newly migrated photo-backup.conf to ensure it is correct.
  2. Update any custom scripts or cron jobs that call photo-backup.sh to use the new -s flag.

These changes make the script much more powerful and easier to manage.

Full Changelog: photo-backup-v1.5.0...photo-backup-v2.0.0