directus-extension-auto-backup
This extension automatically makes backups of your database for you.
- Automatically backups (with directus flows)
- Manually backups
- Save Location (Custom path or in Directus_Files)
- Custom file name for backup files
Supported databases:
- SQLite
In order to support more databases, we need help. If you know how to make a backup of a database, please open an issue and we will add you as a contributor, or you can open a pull request.
-
Backup your database! :D
-
Install the extension
- Normal project
cd <directus-project-folder> npm install directus-extension-auto-backup
- Docker-Compose
Install ist
In your docker-compose.yml modify your container:
directus: image: directus/directus:9.16.1 command: > sh -c " npm install directus-extension-auto-backup && npx directus bootstrap && echo 'Node' && node node_modules/directus/dist/start.js " ... ...
- Normal project
-
Restart the server twice
- First time maybe your database is not ready yet
- Second time the extension should be installed
-
Go to the extensions page and setup the extension
- A new table called
Auto Backup Settings
should be created - visit
http://0.0.0.0:8055/admin/content/auto_backup_settings
- A new table called
- Go to collection "Auto Backup Settings"
- Ensure you configured everything
- Select state --> select "create"
We will use directus flows to create automatic backups.
- Create a new directus flow
- Trigger Setup --> Configure as Schedule (CRON)
- Create a operation --> Update Data
- Collection: Auto Backup Settings
- Permission: Full Access
- Emit Events: true
- Payload :
{ "state": "create", "latest_log": "" }
- Query :
{ "filter": { "_and": [] } }
- Before uploading to git, run
npm run build
to build the extension- Since the weird error
RangeError: Maximum call stack size exceeded
of the packagerollup
, we currently can't auto build the extension on git push
- Since the weird error
- Building the plugin with
npm run build
- Error occurs:
RangeError: Maximum call stack size exceeded
- Just run the command again, it should work the second time
- Error occurs:
The FireboltCasters