Restoring from R2 or S3 Backup
If you’ve used the Bootstrapper to set up automated S3 or R2 backups, a tool exists for restoring that data if it’s ever needed.
Required Steps
In order to use this, you’ll need to have configured automated backups, and have a backup from which to restore your data.
Required Environment Variables
The following environment variables will be used during the restoratino process.
Environment Variable | Required? | Description |
---|---|---|
PB_BACKUP_ENDPOINT_URL | Yes | Find this value based on your provider by reading below. |
PB_BACKUP_BUCKET_NAME | No | The name of the bucket data used to store backup data. |
Once you have these values, export them in your active terminal session before running the restoration tool. For example:
Running the Restoration Process
At this point, you’re ready to run the restoration command. Keep this in mind:
- Running the script will totally wipe out any data currently in your instance.
- During the restoration process, your instance will momentarily shut down.
If that’s cool with you, run the following in the same terminal session where you exported the afforementioned variables:
After kicking it off, you’ll see feedback showing your backup being pulled locally, and stored into your Plausible instance. When it’s all said & done, you’ll see a confirmation message. Give it a minute or two for your instance to start up again, and you’re set!