Skip to content

Backups in the program for Windows and Mac

2 min readSince version 0.7.0

The program for Windows and Mac backs up its database itself, with the same restic as the backup container of the Docker installation: encrypted, deduplicated and compressed, daily, about two minutes after issuing or cancelling, and at the push of a button. It keeps 7 daily, 4 weekly, 12 monthly and every yearly backup. If Rhinvoice is not running at 02:00, it makes the daily backup at the next start.

  1. Open Settings → Backup, for example through the item Set up backups of the checklist on the overview.

  2. Choose a folder. Rhinvoice suggests the OneDrive, Dropbox, iCloud Drive and Google Drive folders it finds on the computer, each with a subfolder Rhinvoice-Backup. Under Another folder … you enter a full path, such as a network drive or a USB disk. A missing folder is created. Click Continue to the key.

  3. Keep the recovery key. Rhinvoice shows the key that encrypts the backups. Copy it into your password manager or print it, apart from this computer. Tick I have stored the key safely and click Set up backups.

The first backup starts within half a minute. Settings → Backup lists the last backups, and the overview warns when the last successful one is older than 24 hours. Later, Show key shows the key again and Change folder chooses another folder; the key stays the same.

Restoring replaces all data with the state of a backup, in a single transaction: if anything fails, nothing changes. Quit Rhinvoice first.

Windows (PowerShell):

Terminal window
& "$env:LOCALAPPDATA\Programs\Rhinvoice\python\python.exe" -m rhinvoice_boot --list-backups
& "$env:LOCALAPPDATA\Programs\Rhinvoice\python\python.exe" -m rhinvoice_boot --restore latest

Mac (Terminal):

Terminal window
/Applications/Rhinvoice.app/Contents/MacOS/Rhinvoice --list-backups
/Applications/Rhinvoice.app/Contents/MacOS/Rhinvoice --restore latest

--list-backups shows the backups with ID and time. Instead of latest, give an ID to bring back an older backup. Then start Rhinvoice as usual; the restored state is backed up again right away.

On a new computer: install Rhinvoice, wait until the cloud service has downloaded the Rhinvoice-Backup folder, and name it with --backup-folder. Rhinvoice then asks for the recovery key and afterwards backs up into the same folder:

Terminal window
/Applications/Rhinvoice.app/Contents/MacOS/Rhinvoice --restore latest --backup-folder "/Users/anna/Library/CloudStorage/OneDrive-Personal/Rhinvoice-Backup"

Where does the program back up to?

To a folder you choose, preferably one that OneDrive, Dropbox, iCloud Drive or Google Drive keeps in sync. Then a copy lives outside the computer. A network drive or a USB disk works the same way.

What happens if I lose the recovery key?

As long as the computer works, Settings, Backup, Show key shows it again. If the computer is lost and the key was kept nowhere else, nobody can restore the backups.

Can the Docker installation restore these backups?

Yes. They are the same restic backups as the backup container's. Use the folder as RESTIC_REPOSITORY and the key as RESTIC_PASSWORD.