# Restore ## Borg backup First we need to install Borg Backup: ```sh dnf install -y borgbackup ``` ## Hetzner Storage Box So I have a Hetzner Storage Box which is reachable by: ```sh ssh -p23 u388089@u388089.your-storagebox.de ``` There are two subdirectories: ```sh /borgbackup # This is an actual borg backup of PhotoPrism with history and everything /cloned_borgbackup # This is a rclone of a borg backup of nextcloud that happens on my local machine. ``` First, we're going to talk about restoring PhotoPrism ## Restore Photoprism List: ```sh export BORG_PASSPHRASE='' borg list ssh://u388089@u388089.your-storagebox.de:23/./borgbackup/photoprism ``` (Optional, to see what you have) Mount a snapshot: ```sh borg mount ssh://u388089@u388089.your-storagebox.de:23/./borgbackup/photoprism::2025-01-14_04:00 /home/moni/borg_restore/ ``` Unmount it: ```sh borg umount /home/moni/borg_restore/ ``` Restore a backup You might want to tmux first: ```sh tmux ``` ```sh borg --progress --verbose extract ssh://u388089@u388089.your-storagebox.de:23/./borgbackup/photoprism::2025-01-14_04:00 /home/photoprism/Pictures ``` Giving a local target directory is not supported. The restore will be in a subdirectory. So if you're in `/home/moni` it will restore to `/home/moni/home/photoprism/Pictures`. You can't change this behavior.