Guiqft / directus-backup-operation

Custom operation to backup the PG database and upload the .dump to Directus.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Directus Backup Operation


35190391-removebg-preview

Custom Directus operation to backup Postgres database using pg_dump and upload the .dump file into Directus storage.

Prerequisites

Make sure you have installed the following prerequisites on your Directus machine.

  • PostgreSQL Client - Install PSQL. Needs to be installed so Node can spawn pg_dump process. If running in Docker, you can check this example repo.

Usage

Clone this project inside your /extensions/operations folder, then:

cd directus-backup-operation/
yarn && yarn build

After activate the extension, you can create a new Directus flow and choose how to trigger the database backup 🚀

Configuration

You can choose which folder to upload the database .dump file, just type the folder name on operation register. Make sure to type a valid folder name on your Directus storage.

For now, this extension supports only local as Directus storage

About

Custom operation to backup the PG database and upload the .dump to Directus.


Languages

Language:TypeScript 100.0%