Mirroring Gallery

Quick Start
How do I mirror my images automatically?

Gallery includes some basic mirroring functionality, to ease the load on your master server from all the image loading.


Mirroring CANNOT be used to save disk space. See FAQ C.35 for more information.

Quick Start

  1. Copy your albums directory onto a remote web server.

  2. Run the configuration wizard again, and add the address of the albums directory to the list of mirrors.

  3. Test it!

How do I mirror my images automatically?

Gallery will not automatically update your mirror sites. However, programs such as rsync can be used with cron to automate the process. Here's a useful shell script to mirror your albums to a remote server over SSH:

if lockfile ~/.rsync-album.lock; then
    rsync -aCz "$@" --delete -e ssh /path/to/local/albums/ remote.example.com:/path/to/remote/albums/
    rm -f ~/.rsync-album.lock


Heeeelp! My images are still being loaded from the master server!

  • Are you sure you have specified the path to the remote albums directory correctly in the config wizard? Gallery will fall back to the master server if it can't find its .dat files on the remote server.

  • Did you modify the album after uploading the albums directory? Each album is pulled from the mirror on an all-or-nothing basis, so when the album is changed, it will be loaded from the master server until the mirror has been updated.

Wait a minute! Albums are being loaded from the mirrors but the highlight images are not!

This is intentional. Since Gallery only maintains state per-album, it would need to check on each album to see if its highlight image is up to date. It was decided that this would be too slow.