Custom Directus operation to backup Postgres database using pg_dump
and upload the .dump
file into Directus storage.
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.
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 🚀
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