JSPM

pb-sync

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q9161F
  • License MIT

Pocketbase database migrate & restore between two instances

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

  1. Clone this repository
  2. Run npm install to install dependencies
  3. 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.