diff --git a/docs/self-hosting/manage/backup-restore.md b/docs/self-hosting/manage/backup-restore.md index 807c7ee..f17700a 100644 --- a/docs/self-hosting/manage/backup-restore.md +++ b/docs/self-hosting/manage/backup-restore.md @@ -8,7 +8,8 @@ keywords: plane backup, plane restore, database backup, postgresql backup, data Backing up your data regularly helps prevent data loss and allows you to restore your system quickly if necessary. Follow these instructions to back up and restore your data using Plane’s command-line interface. -## Backup data +## For Docker Compose +### Backup data ::: warning **Prime CLI is for Docker installations only.** These commands only work on Plane instances originally installed using `prime-cli`. @@ -28,7 +29,7 @@ This command initiates a full backup of all critical data, storing it in the def Each backup file will be timestamped to ensure you can easily identify the latest or a specific backup if needed. -## Backup plane.env +### Backup plane.env If you need to back up only the `plane.env` file, you'll need to do it manually. Here’s how: @@ -36,7 +37,7 @@ If you need to back up only the `plane.env` file, you'll need to do it manually. 2. Locate the `plane.env` file. 3. Copy this file to a different location as a backup, so you can restore it if needed. -## Restore data +### Restore data You can restore your data from a previous backup with ↓: @@ -150,3 +151,24 @@ Follow these steps to restore data from a backup: That’s it! You’re back up and running with your restored data. ::: + + +## Other deployment methods + +For Kubernetes, or other deployment methods, use your platform's native backup tools. Plane stores data in two places that need to be backed up: + +| Component | What it contains | +|-----------|------------------| +| **PostgreSQL database** | All Plane data — workspaces, projects, work items, users, comments, settings | +| **Object storage** | Attachments, uploaded images, files (MinIO, S3, or S3-compatible storage) | + +### Configuration files + +Also back up your environment configuration — this includes database connection strings, storage credentials, and other settings. + +- **Kubernetes:** Helm values file, ConfigMaps, and Secrets +- **Other platforms:** Environment variables or configuration files specific to your setup + +:::tip +Store backups in a separate location from your Plane installation — ideally offsite or in a different cloud region. +::: \ No newline at end of file diff --git a/docs/self-hosting/upgrade-from-community.md b/docs/self-hosting/upgrade-from-community.md index 7c23292..3fb40cb 100644 --- a/docs/self-hosting/upgrade-from-community.md +++ b/docs/self-hosting/upgrade-from-community.md @@ -115,6 +115,122 @@ This upgrade path is for installations using external or managed database and ob ``` Your Commercial Edition instance is now connected to your existing external database and storage. +::: + +:::details Manual backup and restore without CLI + +Use this method if you prefer to back up data manually or if the setup.sh script isn't working for your environment. + +### What gets migrated + +- PostgreSQL database (all Plane data) +- MinIO uploads (attachments, images, files) + +### Prerequisites + +- Plane CE and Commercial versions should be compatible +- Shell access to both servers +- Docker installed on both servers + +### Back up data on Community instance + +1. Create backup folders: + + ```bash + mkdir -p ~/ce-backups/db + mkdir -p ~/ce-backups/minio/uploads + cd ~/ce-backups + ``` + +2. Back up PostgreSQL data: + + ```bash + docker cp plane-app-plane-db-1:/var/lib/postgresql/data/. db/ + ``` + +3. Back up MinIO uploads: + + ```bash + docker cp plane-app-plane-minio-1:/export/uploads minio/uploads/ + ``` + +4. Verify backup sizes: + + ```bash + du -sh db minio/uploads + ``` + + Make sure sizes look reasonable (not just a few KB). + +5. Transfer backup to Commercial server: + + ```bash + scp -r ~/ce-backups user@commercial-server:/tmp/ + ``` + +### Restore data on Commercial instance + +1. Stop Plane: + + ```bash + prime-cli stop + ``` + + Verify all containers are down: + + ```bash + docker ps + ``` + +2. Back up existing Commercial data (safety precaution): + + ```bash + mv /opt/plane/data/db /opt/plane/data/db.bak + mv /opt/plane/data/minio/uploads /opt/plane/data/minio/uploads.bak + ``` + +3. Restore PostgreSQL: + + ```bash + mv /tmp/ce-backups/db /opt/plane/data/db + ``` + +4. Restore MinIO uploads: + + ```bash + mv /tmp/ce-backups/minio/uploads /opt/plane/data/minio/uploads + ``` + +5. Start Plane: + + ```bash + prime-cli restart + ``` + +### Validate the migration + +- Login works +- Projects are visible +- Attachments open correctly + +### Rollback + +If something fails, restore from the backup you created in step 2: + +```bash +prime-cli stop + +rm -rf /opt/plane/data/db +mv /opt/plane/data/db.bak /opt/plane/data/db + +rm -rf /opt/plane/data/minio/uploads +mv /opt/plane/data/minio/uploads.bak /opt/plane/data/minio/uploads + +prime-cli restart +``` + +::: + ## What's next