https://github.com/guiqft/directus-backup-operation
Custom operation to backup the PG database and upload the .dump to Directus.
https://github.com/guiqft/directus-backup-operation
backup directus directus-extension directus-extension-operation hacktoberfest postgresql
Last synced: 3 months ago
JSON representation
Custom operation to backup the PG database and upload the .dump to Directus.
- Host: GitHub
- URL: https://github.com/guiqft/directus-backup-operation
- Owner: Guiqft
- Created: 2022-09-14T22:32:37.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-06T23:09:54.000Z (over 2 years ago)
- Last Synced: 2025-04-05T10:23:27.861Z (6 months ago)
- Topics: backup, directus, directus-extension, directus-extension-operation, hacktoberfest, postgresql
- Language: TypeScript
- Homepage:
- Size: 489 KB
- Stars: 17
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Directus Backup Operation
![]()
Custom Directus operation to backup Postgres database usingpg_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](https://packages.ubuntu.com/bionic/any/postgresql-client). Needs to be installed so Node can spawn `pg_dump` process. If running in Docker, you can check this [example repo](https://github.com/Guiqft/directus-psql-docker-example).
## Usage
Clone this project inside your `/extensions/operations` folder, then:
```bash
cd directus-backup-operation/
``````bash
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