Data Export and Import
Learn how to export and import your Pocket ID data for backup or migration
The Pocket ID CLI lets you export and import your Pocket ID, including the database and the uploaded images. This is useful when creating backups, moving an installation to another instance or switch database providers.
[!WARNING] This feature is experimental and may not work correctly. Please create a backup before importing data and report any issues you encounter.
Exporting Data
Use the export command to create a backup file:
Exporting to standard output
You can pass --path - to write the export to standard output. This is helpful when piping the archive or working with Docker:
Example: Export with Docker
Exporting to standard output is often the simplest approach when running Pocket ID in Docker:
Importing Data
- Shut down your Pocket ID instance.
- Use the import command to restore a previously exported archive:
Importing from standard input
Like export, you can use --path - to read from standard input:
When importing from standard input, you must include --yes to confirm the operation without a prompt. The following prompt cannot be shown when reading from standard input:
Example: Import with Docker
When using Docker, importing from standard input is often the easiest method: