Package Exports
- pb-sync
- pb-sync/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pb-sync) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pb-sync (Pocketbase Sync)
A command line tool to sync data between two Pocketbase instances.
Table of Contents
Features
- Downloads a backup from the source Pocketbase instance
- Uploads the backup to the target Pocketbase instance
- Progress bar showing download status
- Support for environment variables or manual credential entry
- Error handling and cleanup of temporary files
Installation
- Clone this repository
- Run
npm install
to install dependencies - Create a
.env
file (optional) with your credentials
Usage
[!CAUTION] All data inside target instance will be lost and replaced with the data from source instace
[!IMPORTANT]
You need superuser account for both source and target instances.
Using stdin Input
- Run
npm run start
to start using the tool - Input the credentials as prompted and wait for the tool to download, upload and restore the data.
Using Environment Variables
Create a .env
file with the following variables:
SOURCE_URL=
SOURCE_EMAIL=
SOURCE_PASSWORD=
TARGET_URL=
TARGET_EMAIL=
TARGET_PASSWORD=
then run the tool using npm run start
and wait for the tool to download, upload and restore the data.