Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › Data Protection

How to Back Up a Self-Hosted Photo Library So a Server Failure Doesn’t Erase Your Photos

By Freedom251 Team · · 12 min read

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A server backup is not automatically a photo backup. To survive a dead motherboard, failed disk, ransomware, or an accidentally deleted library, preserve two different things: the original photo and video files, and the self-hosted application’s database. The database usually contains paths, albums, faces, users, and other metadata; it does not contain the media itself. Keep those copies outside the server, include an off-site copy, and rehearse a restore on replacement hardware.

The two backups every self-hosted photo library needs

Think of a photo service as two layers that happen to work together:

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Media files: the original JPEG, HEIC, RAW, video and other files, including files in external libraries or mounted shares.
  • Application state: the database and the configuration needed to reconnect that database to the files. This includes paths, albums, captions, users, permissions, face-recognition results and other metadata.

Immich’s backup documentation makes the distinction explicit: its database stores paths and user metadata, does not scan the library folder to reconstruct the database, and a database backup does not contain photos or videos. A database dump without the corresponding files can therefore restore an empty-looking catalog, while a folder of originals without the database may leave you with files but none of the organization built around them.

The same principle applies to other self-hosted products, but folder names and recovery procedures differ. Use the database and filesystem instructions for your application and its specific version rather than copying an Immich procedure verbatim.

#1 Best Overall
Sale
WD 2TB Elements Portable External Hard Drive for Windows, USB 3.2 Gen 1/USB 3.0 for PC & Mac, Plug and Play Ready - WDBU6Y0020BBK-WESN
  • High capacity in a small enclosure – The small, lightweight design offers up to 6TB* capacity, making WD Elements portable hard drives the ideal companion for consumers on the go.
  • Plug-and-play expandability
  • Vast capacities up to 6TB[1] to store your photos, videos, music, important documents and more
  • SuperSpeed USB 3.2 Gen 1 (5Gbps)

Use a 3-2-1 design, not a single “backup” disk

Immich recommends a 3-2-1 backup strategy. In practical terms, aim for at least three copies of the data, stored on two different kinds of storage, with one copy away from the server’s location. The exact media and retention period are decisions for your library, but the independence between copies is the important part.

Copy Purpose What it should contain
Primary server Normal day-to-day use Live originals, database and application configuration
Separate local device Fast recovery from a disk or host failure Versioned copies of originals plus a matching database dump
Off-site destination Protection from theft, fire, flood or a site-wide incident A copy that can be recovered without the local server or local backup drive

An external hard drive beside the server is useful for the second copy, but it is not geographically separate. If it remains plugged in and writable, malware or an administrative mistake can also affect it. Add a remote machine, an object-storage destination, or an offline rotation before treating the plan as disaster protection.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Inventory the data before choosing a tool

Write down what the application actually uses. A backup job that captures only the obvious upload directory can miss an external library, a database volume or the configuration that defines mount points.

  • Original and imported media: include every asset tree managed by the application.
  • External libraries: record each host path, container path, network share and read-only or read-write setting.
  • Database: identify the database engine, database name, credentials and the application-supported dump method.
  • Configuration: retain compose files, environment files, service definitions, reverse-proxy settings, certificates, scheduled-job definitions and any storage-template settings.
  • Secrets and keys: document where encryption keys, repository passwords and access tokens are stored, without placing the secret itself in an unprotected note.
  • Version context: record the application version, database version and backup-tool version used to create each snapshot.

For Immich, storage-template choices and external-library setups change which folders matter. Use the current Immich documentation to identify the exact folders in your installation, then test that your backup job reaches those folders rather than merely backing up an empty mount point on the host.

Make the database and media consistent

A catalog and its files must describe the same point in time. If the database references a new upload that was not copied before the server failed, a restore can contain a record for a file that is absent. If files are copied first and the database changes during the copy, the reverse mismatch is possible.

Immich recommends stopping the server while the backup runs when that is practical. A stopped service provides a stable database and filesystem snapshot. If downtime is not possible, its guidance recommends taking the database backup first and copying the filesystem second. That ordering reduces the chance that a restored database points to files that were not included in the filesystem copy.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
WD 2TB My Passport, Portable External Hard Drive, Black, backup software with defense against ransomware, and password protection, USB 3.1/USB 3.0 compatible - WDBYVG0020BBK-WESN
  • Slim durable design to help take your important files with you
  • Vast capacities up to 6TB[1] to store your photos, videos, music, important documents and more
  • Back up smarter with included device management software[2] with defense against ransomware
  • Help secure your important files with password protection and hardware encryption
  • 3-year limited warranty

Do not confuse a storage snapshot with an application-consistent backup. A snapshot can be useful, but you still need a supported database dump and a documented way to restore the application version that created it.

A repeatable backup workflow for Immich

1. Record the state you are about to capture

Note the Immich release, database version, host name, mount points and the destination snapshot identifier. If a restore guide changes between releases, this record tells you which instructions match the backup. Immich’s current documentation notes that its restore instructions changed in version 2.5.0, so do not assume a guide written for an older release still applies unchanged.

2. Quiesce the application when possible

Schedule the job for a quiet period and stop Immich’s services using the supported administration method. Confirm that no import, upload, face-recognition task or database migration is still running. If you must keep the service online, use the database-first, filesystem-second order and accept that a busy library needs a more careful consistency check.

3. Create the supported database dump

Use Immich’s documented database-backup procedure for your installed release. Save the resulting dump in the backup set, not only on the server’s local disk. Built-in database backups are metadata-only; they must travel with the original media files. Keep enough dumps to recover from an unnoticed deletion or a bad migration, rather than overwriting the only dump each night.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Copy every required media tree

Back up the original assets and any external-library paths identified during inventory. Preserve file names, directory structure, timestamps and permissions where the application depends on them. Follow Immich’s current folder guidance for your storage template. A copy that contains only thumbnails or transcoded derivatives is not a substitute for the originals.

5. Put the dump and asset tree in one versioned snapshot

Immich’s Borg example places the database dump and asset tree in the same snapshot. A versioned tool such as Borg can retain multiple points in time, detect unchanged data efficiently and verify archive integrity. The example excludes regenerable thumbnails and encoded video to save space; apply that only when you have confirmed those files really can be recreated in your installation and that your recovery-time expectations allow it. Never exclude original photographs or videos merely because another derivative exists.

Rank #3
Sale
Aiolo Innovation 500GB External Hard Drive Ultra Slim Portable HDD-USB 3.0 for PC, Mac, Laptop, PS4, Xbox one,Xbox 360 HD-A4
  • Ultra fast data transfers: the external hard drive works with USB 3.0 thickened copper cable to provide super fast transfer speeds. Theoretical read speed is as high as 110MB/s-133MB/s and write speed is as high as 103MB/s.
  • Ultra-thin and quiet: the motherboard adopts a noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
  • Compatibility: compatible with PS4/xbox one/Windows/Linux/Mac/Android,Stable and fast downloading on game console no difference from fast transmission when using on PC.
  • Plug and Play: no software to install, just plug it in and the drive is ready to use. The hard drive chip is wrapped with aluminum anti-interference layer to increase heat dissipation and protect data
  • Package Contents: 1* portable hard drive, 1 *USB 3.0 cable, 1*USB to type C adapter,1 *user manual, shell packaging, three-year manufacturer's warranty and free technical support services

6. Verify the completed snapshot

Check the tool’s exit status and archive verification result. Compare the number of source and destination files, inspect recent uploads and open representative RAW, HEIC, JPEG and video files from the destination. A successful copy command is not proof that a mounted external library was readable or that the database dump was valid.

7. Resume services and retain the record

Restart Immich only after the database dump and filesystem copy have completed. Store the snapshot date, application version, database-dump filename and restore notes with the backup catalog. Keep the credentials required to read the destination somewhere other than the server being protected.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose local, remote and cloud destinations by recovery needs

Destination Separation Recovery characteristics Automation and retention Costs and key concerns Testing
External hard drive Separate device, but on-site unless rotated elsewhere Usually the fastest option because local bandwidth is high Simple scheduled copies; version retention depends on the backup tool and drive capacity One-time hardware cost; vulnerable while connected; encrypt it if it leaves your control Easy to attach to replacement hardware and perform a test restore
Remote machine with a Borg repository Can be geographically off-site Recovery speed depends on the network between sites Borg supports deduplication and versioned archives; Immich’s script names a remote machine and BorgBase as possible destinations Remote storage, bandwidth and administration costs; protect repository credentials Restore a sample archive to a temporary host and confirm mounts
Object storage such as Backblaze B2 Designed for off-site storage Upload is automatic once configured; large restores depend on download bandwidth and provider charges Requires compatible backup software, lifecycle rules and a retention design Usage, API and download charges vary; customer-managed SSE-C keys must be preserved because losing the key prevents decryption Perform a small download and periodically restore a full representative set
Offline encrypted drive Strongest isolation when disconnected and stored elsewhere Slowest and most manual recovery; current data may be days or weeks old Rotation schedule must be maintained by people, not only a scheduler Extra drives and secure storage; encryption keys need an independent recovery record Connect on a planned schedule, verify the archive, then disconnect again

No destination is universally best. A local drive can get a failed server running quickly, while a remote or offline copy is what helps when the whole site is lost or the local system is compromised. Object storage removes the need to operate a second server but introduces client-software, egress-cost and key-management decisions.

Protect credentials and encryption keys separately

A backup that cannot be decrypted or authenticated is not recoverable. Keep repository passwords, API tokens and encryption keys outside the server that performs the backup. Use a password manager, printed emergency record or another protected mechanism appropriate to your household or team, and make sure a trusted person can retrieve the information if the administrator’s computer is unavailable.

For object storage using customer-managed server-side encryption keys, the provider cannot decrypt data without the key. Losing an SSE-C key therefore makes the stored backup unreadable even if the objects still exist. Back up the key with the same seriousness as the media, but never place an unencrypted key file beside the archive.

Use least-privilege credentials: the backup writer should not be able to delete every historical snapshot, and a restore credential should be available when the production server is down. Where the software supports immutable or append-only repositories, enable that protection for at least part of the retention window.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
YOTUO 1TB External Hard Drive, Portable Storage Expansion HDD, USB 3.0 & USB-C for PC, Mac, Desktop, Laptop, Smartphone, PS4, Xbox One, Xbox 360, Office & Game, Black
  • 【Versatile Storage Expansion – For Gaming, Work & Everyday Use】 Running out of space on your PS5 or Xbox Series X/S? This external hard drive lets you store and play PS4 / Xbox One games directly, instantly freeing up your console’s internal storage for next‑gen titles. At the same time, it handles work file backups, media libraries, and cross‑device data transfers with ease. One drive, all your needs. *(Note: PS5 / Xbox Series X|S games cannot be run or stored directly from the external hard drive. However, by offloading your PS4 / Xbox One games, you can free up valuable space for newer titles.)*
  • 【Patented Silicone Sleeve – Data Protection You Can Count On】 Worried about drops? We’ve got you covered. The patented built‑in silicone sleeve acts like a shock‑absorbing armor, cushioning your drive against bumps and falls. Whether it’s important work documents, precious family photos, or hard‑earned game saves, your data deserves this level of protection.
  • 【Plug & Play, Compatible with Computers & Consoles】 No complicated setup—just plug in and go. Works seamlessly with Windows, Mac, and Linux computers, as well as PS4, PS5, Xbox One, and Xbox Series X/S. Process files at the office, back up data at home, or enjoy gaming in your downtime—one drive handles all your devices, simply and hassle‑free.
  • 【USB 3.0 Ultra‑Fast Transfer – No More Waiting】 Tired of watching progress bars crawl? With USB 3.0 speeds up to 5Gbps, large files transfer in seconds. Whether you’re moving work documents, transferring hundreds of gigs of games, or backing up a year’s worth of photos, you get more done in less time.
  • 【Sleek, Lightweight, and Ready to Go】 Weighing just 0.16 kg—lighter than a can of soda—this compact drive features a stylish mirror‑and‑frosted finish. Toss it in your bag and go, whether you’re heading to the office, visiting a friend for a gaming session, or giving a presentation on the road.

Design the restore before a failure

Restoration is the test that determines whether a backup is useful. Keep a short runbook that another technically capable person can follow without guessing mount paths or searching through old messages.

  1. Prepare replacement hardware or a clean host. Install the operating system, container runtime and any storage drivers required by the application.
  2. Install a compatible application release. Match the release context recorded with the backup. Read the current restore guide, especially when crossing a release such as Immich 2.5.0, where the documented restore process changed.
  3. Recreate the storage layout. Restore the data folders and external-library mount structure before starting the application. The paths visible inside the container or service must match the paths stored in the database.
  4. Restore the database dump. Use the application-supported import procedure for the matching database version. Do not expect the application to rebuild albums and metadata by scanning the asset directory.
  5. Restore the media files. Copy or mount the original asset trees from the local, remote or cloud repository. Check ownership and permissions so the application account can read them.
  6. Start the services and inspect the catalog. Confirm users, albums, dates, external libraries and representative originals. Look for missing-file warnings rather than assuming a successful login means a complete restore.
  7. Regenerate optional derivatives. Recreate thumbnails or encoded video only after originals and database state are confirmed. This is why some backup examples omit regenerable data.
  8. Document the result. Record the snapshot used, differences from the original host and any manual repair, then update the runbook while the details are fresh.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Test restores and retention deliberately

CISA’s StopRansomware guidance recommends offline, encrypted backups and regular testing of backup procedures. Testing does not require destroying the production server: restore a recent snapshot to a temporary host, disconnect it from public access, and verify that the application can open originals and metadata. Test an older snapshot occasionally as well, because a silent corruption or accidental deletion may predate the newest copy.

Retention should reflect how far back you may need to travel. Immich’s script example keeps four weekly and three monthly Borg snapshots. That is an implementation example, not a universal rule or a measured outcome. Choose a schedule that covers your upload frequency and the time it might take to notice unwanted deletion, then confirm that storage and download costs remain acceptable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

After each test, check three separate results: the database imports without errors, the original files are readable, and external-library mounts resolve to the intended locations. A test that checks only one of these can miss the failure that matters most.

Common failure modes and fixes

The database restored but the library is empty

The media tree was not restored, or it was mounted at a different path. Restore the original asset folders and recreate the application’s expected mount structure before attempting another database import.

Photos exist on disk but albums and metadata are missing

The filesystem copy survived but the database dump did not, was taken from another date, or is incompatible with the installed release. Locate the matching dump and application-version record. If no usable database exists, you may still have the originals, but the catalog must be rebuilt according to the product’s documented recovery options.

Best Value
WD 4TB My Passport, Portable External Hard Drive, Black, Backup Software with Defense Against ransomware, and Password Protection, USB 3.1/USB 3.0 Compatible - WDBPKJ0040BBK-WESN
  • Slim durable design to help take your important files with you
  • Vast capacities up to 6TB[1] to store your photos, videos, music, important documents and more
  • Back up smarter with included device management software[2] with defense against ransomware
  • Help secure your important files with password protection and hardware encryption
  • 3-year limited warranty

Recent uploads are missing

The backup ran before those files were copied, or the job could not read a mounted external library. Inspect the job log, compare the upload date with the snapshot date and verify mount accessibility from the backup process itself.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The cloud archive exists but cannot be downloaded

Check the client configuration, object permissions, network limits and expected restore charges. If customer-managed encryption was used, retrieve the exact key associated with that archive; a different key cannot decrypt it.

An always-connected drive was encrypted or deleted

Treat this as a reason to add an offline or off-site layer, not as evidence that the backup tool failed. Separate credentials, append-only or immutable retention and a disconnected rotation reduce the chance that one compromised host can erase every copy.

A restore guide no longer matches the installation

Use the guide for the application and version that created the backup, then follow the current migration notes. For Immich, specifically check the version-aware instructions because the documented restore process changed in v2.5.0.

Adapting the plan to another self-hosted photo product

Immich is the concrete example here because its documentation clearly separates database backups from filesystem backups. If you run another application, keep the architecture but replace the product-specific steps:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Find the vendor’s supported database dump and restore procedure.
  • List every original-media and external-library path used by your deployment.
  • Identify which caches, thumbnails and transcodes are regenerable and which files are originals.
  • Record the release and database versions required for a compatible import.
  • Restore to a clean host in a test environment before relying on the procedure in an emergency.

Do not rely on RAID, a mirrored directory or a second folder on the same server as the complete plan. Those mechanisms may improve uptime or protect against one disk failure, but they do not provide the independent, off-site and preferably offline copies needed for a site-level disaster.

A practical operating schedule

  • After each backup: inspect the job result, confirm the database dump is present and sample newly added media.
  • Monthly: verify an archive and review whether external-library mounts, credentials and encryption keys are still documented.
  • Several times a year: perform a test restore on replacement hardware or an isolated host.
  • When changing versions or storage: create a known-good snapshot first, record the new paths and repeat the restore test.
  • When changing administrators: transfer access to the backup repository, password manager and key-recovery record, then have the new operator perform a restore.

What a complete plan looks like

A resilient arrangement has the live library on the server, a versioned local copy containing both originals and a matching database dump, and an independent off-site copy. The backup process knows every external-library path, stores configuration and version information, protects credentials and encryption keys separately, and has been exercised on replacement hardware. That combination—not a database export, RAID, or an always-connected second disk by itself—is what keeps a server failure from becoming a permanent loss of your photos.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Data ProtectionImmichphoto backupself-hostingserver-failure

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.