Skip to content

Backup, import/export & updates ​

CocktailPi offers two ways to save data, for different purposes:

BackupExport
PurposeSave or move the whole machineShare recipes with other machines or people
ContainsEverything: recipes, ingredients, pumps, glasses, settings, users, order history, eventsSelected recipes and collections with their ingredients and images
RestoringReplaces all dataAdds to the existing data
WhoSuper-AdminAdmin

Both are under Administration → Transfer.

Backup and restore ​

Backup

Download backup saves a complete copy of the machine's database (cocktailpi-backup-<date>.db). Passwords are only included as hashes. Keep one before bigger changes, before an update, or to move CocktailPi to a new SD card. The Python environment for event actions isn't part of it: reinstall your Python libraries after moving to a new SD card.

Restore backup → Choose backup file:

  1. CocktailPi checks the file and shows what it contains (recipes, ingredients, pumps, users).
  2. After Restore, CocktailPi restarts with the backup. This takes about a minute. Then you log in with an account from the backup.
  3. Backups of older versions are updated automatically. Backups of newer versions are refused – update CocktailPi first.

Nothing gets lost if something goes wrong: the previous data is kept as /root/cocktailpi/cocktailpi-data.db.before-restore. If CocktailPi can't start with the backup, it puts the previous data back and shows The last restore (…) failed. The previous data was kept.

A restore isn't possible while pumps are running.

Import and export ​

Export creates a ZIP file with the recipes and collections you choose (Export all, Export selected or Export no recipes/collections), including the ingredients they use and all images.

Import reads such a ZIP file. After Upload you choose what to import (all, selected or none of the recipes and collections, and whether to take over glasses and categories) and a Duplicate strategy for things that already exist with the same name:

  • Overwrite – replace the existing one,
  • Skip – keep the existing one,
  • Keep both – import it as a copy with "(imported)" in its name.

Pumps, users and settings are never part of an export.

Updates ​

The built-in updater ​

Administration → System → General → Check for update (Super-Admin) looks for a newer release on GitHub. If there is one, Install update installs it:

  1. The new version is downloaded while CocktailPi keeps running. Every file is checked against the checksums (SHA256SUMS) published with the release; if a file doesn't match, the update stops and nothing changes.
  2. CocktailPi stops, saves a copy of the database to /root/cocktailpi/db-backup/<old version>/ and the old program as cocktailpi.jar.previous, installs the new version and starts again.
  3. If the new version doesn't start within five minutes, the updater puts the old version and database back.
  4. With the touchscreen UI installed, the Pi reboots at the end.

Pre-releases are skipped: the updater only installs regular releases. Do not power down your system while the update is running. The updater writes its log to /root/cocktailpi/updater.log.

Updating with the installer ​

Alternatively, run the installer again and choose the same option as before. It replaces CocktailPi with the latest release and keeps your data.

Try the online demo

Log in with the credentials below. The demo is shared with other visitors and is reset from time to time, so your changes may be lost.

User
Admin
Password
123456