BiblioViva Documentation
Installation

Restart from a backup

This page explains how to put back into BiblioViva the data of a backup: after the failure of the card or the disk, on another computer, after an error that deleted data. It is for whoever administers BiblioViva.

Which file is needed

BiblioViva produces three kinds of file; each can be restored.

FileWhere it isWhat it contains
biblioviva-YYYYMMDD-HHMM.dbin the computer's backups folder, one per nightthe library's data; the photos and the covers are in the backups/uploads folder
biblioviva-export-YYYYMMDD-HHMM.zipdownloaded with Export everythingdata, photos, covers and the whole configuration
biblioviva-YYYYMMDD-HHMM.zipin the backups folder, from the Create backup buttonthe parts chosen when the backup was made

The configuration (settings, staff accounts, card and label templates) is part of the .zip files only. Restoring a nightly .db backup, the configuration stays the one of the first run.

Procedure

If BiblioViva works: restore from the program

  1. Open BiblioViva with the admin account, then Administration, then Backups.
  2. For a file already in the list, press Restore… on its row.
  3. For a file brought from another computer, press Upload an archive and choose the file. The browser accepts files up to 30 MB; a larger one is copied into the computer's backups folder (next section) and then chosen from the list.
  4. Read the check that BiblioViva shows: the parts the file contains (with a box each), how many rows there are now and how many in the file. Clear the tick of the parts not to be touched: they stay as they are.
  5. Press Restore. At the question "Restore the chosen parts?" confirm. The chosen data and configuration replace the current ones.
  6. Wait for the message "Restore completed".

Warning. The restore replaces the chosen data with those of the file. If the computer has recent data not to be lost, first press Back up now.

Copy a large file to the computer

  1. From the computer where the file is, copy it into the backups folder of the BiblioViva computer, replacing <user> with the username and <file> with the file name. The command works in the terminal of Windows, macOS and Linux; in place of biblioviva.local the address used to connect to the computer can be used.

    scp <file> <user>@biblioviva.local:biblioviva/backups/
    
  2. Open Administration, then Backups: the file appears in the list, and is restored with Restore….

If BiblioViva does not open: restore from the terminal

On the BiblioViva computer, with the terminal open as at the step Connect to the computer.

  1. Copy the file into the backups folder (with scp as above, or from a USB drive).

  2. Stop BiblioViva.

    cd ~/biblioviva && docker compose stop app
    
  3. Have the restore program read the file, replacing <file> with its name. The program checks the file and writes what it contains, without changing anything.

    docker compose run --rm --entrypoint bun app cli/backup-restore.js /backups/<file>
    
  4. If the check reports no errors, repeat the command with --yes at the end: it really restores.

    docker compose run --rm --entrypoint bun app cli/backup-restore.js /backups/<file> --yes
    
  5. Restart BiblioViva.

    docker compose start app
    

From the first run

On a newly installed computer, or when starting again from scratch, the guided procedure can restore an Export everything archive without answering its questions. The choice appears only until the guided procedure is completed.

  1. Open the BiblioViva address printed by setup.sh: the First-time setup page opens.
  2. In the first step, under the choice of language, press Restore from a backup.
  3. Press Choose the archive and choose the file biblioviva-export-YYYYMMDD-HHMM.zip. The browser accepts files up to 30 MB.
  4. Wait for the check. BiblioViva shows the library that made the archive, the date, the version, how many patrons, books and loans it contains and the accounts that will be able to log in.
  5. Press Restore. Settings, data and pictures come back as they were in the archive, all at once.
  6. Wait for the "Restore completed" screen, which lists the accounts of the archive.
  7. Press Go to the login and log in with one of those accounts, with the password it had in the archive.

An incomplete archive, one from a newer version or one that is not BiblioViva's is refused before anything is changed, with a message that explains why. For an archive larger than 30 MB complete the guided procedure and restore from the terminal, as described above.

On another computer

  1. Prepare the computer and install BiblioViva with steps 1-4 of the chosen path (see Installation), with the same way of connecting as before.
  2. At the step First run restore the file from the first screen of the guided procedure, as described in the section From the first run; the rest of the guided procedure is not needed.
  3. If the backup comes from a different computer, open Administration, Configuration, Performance and check the Computer field: the backup brings that of the old computer.

Result

BiblioViva shows again the patrons, books, loans and photos of the file. The staff accounts and their passwords are those of the backup, if it contained the configuration; otherwise they are those chosen at the first run.

Possible problems

A–Z index