Database backup resource

This is a basic script that creates a dump of your database for the purpose of having backups of data. This system currently only runs on command but will be expanded.

:information_source: It is my opinion that this sort of task should not be done within fxserver but externally, however I can understand that in certain scenarios this is not possible (be it due to hosting limitations, lack of experience, etc…).
I believe that such a resource should be open source and transparent in it’s behaviour for it to be used safely and allow it to be tailored to the needs of a server.

Feature list:

  • Table Selection: Choose which tables to exclusively backup or which ones to skip (whitelist/blacklist basis)
  • Archiver: clear “expired backups” whilst keeping a minimum number of backups
  • Cron: program automatic backups on a defined interval (requires ox_lib )

Github Repository: :link: Maximus7474/mps-cfx-db-backuper

All contributions are welcome to expand the scope of it, and it is not in it’s final state.
If you require support or wish to request features, this is to be done via the Issues tab of the resource to be properly considered.

The resource is licensed under MIT as it should be in my opinion being only a simple tool.

DISCLAIMER: this resource is not endorsed or sponsored by Cfx

11 Likes

Update v1.0.0

Features were added to make this resource more reliable and easier to integrate, aiming to get it closer to an install & forget resource.

The following automations were added to the resource:

  • Archiver:
    • A system that automatically purges “expired” backups avoiding to clog up your storage
    • Provides protection to avoid deleting all backups in case of lengthy downtime (configurable)
    • Read More - Github
  • Cron:
    • Allows you to define the frequency that backups are to be made
    • Includes an easy to use config field determining either frequency or fixed time

If there are any questions regarding this resource feel free to ask them, same goes for critiques of implementations or even requesting features.

2 Likes

Thanks