mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-06 09:13:19 +03:00
[PR #998] feat: add CLI command for importing and exporting Pocket ID data #510
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pocket-id/pocket-id/pull/998
Author: @stonith404
Created: 10/2/2025
Status: 🔄 Open
Base:
main← Head:feat/data-export-import📝 Commits (10+)
c822feafeat: add CLI command for importing and exporting Pocket ID data847c744undo accidental connection string changef333ff7fix linter issue5995a33return error early if pocket id version is too low32de502fix error handling01225f0Merge branch 'main' into feat/data-export-importa47a017enable triggers again for postgres34b29c6prevent zip slip and fail early if file too largedda6dc8don't handle json specially9e764e6don't encode html in json📊 Changes
4 files changed (+623 additions, -12 deletions)
View changed files
📝
backend/internal/bootstrap/db_bootstrap.go(+18 -9)➕
backend/internal/cmds/export.go(+234 -0)➕
backend/internal/cmds/import.go(+367 -0)📝
backend/internal/cmds/root.go(+4 -3)📄 Description
This PR introduces two new commands (
importandexport) to the CLI. With these two commands all Pocket ID data, including the uploaded images, keys and database content can be exported to a ZIP file which then can be imported to a new instance. The limitations are that data can't be imported from an instance that uses another database provider or an instance that runs an older version than the exported data.TODO:
Docker Image:
ghcr.io/pocket-id/pocket-id:pr-998Closes #721
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.