Howdy folks,
im proud to present to you my new Database Backup System.
This System automatically creates Backups of your Database after a certain time.
Get it here: https://drshwaggins-scripts.tebex.io/package/5986293
FiveM Version: https://drshwaggins-scripts.tebex.io/package/5988507
Your data is the lifeblood of your RedM project, and losing that information because your forgot to make a manual backup can be devastating. However, with this System for automatic database backups, you no longer need to worry. The Systems creates a new file for each backup so you can recover data from minutes, hours, days or even weeks ago. You can also use an ingame command to create a Backup at any moment.
No need for executable files (exe) and manual backups anymore!
Very easy installation
You just need to put the script in your ressource folder and ensure it in your server / ressource.cfg ! After that insert your Database name in the givin parameter in the config.lua and setup your custom time configuration as your desire. You can also Setup a Max amount of Backups that should be created to not fill your backup folder with tons of files. If the Max amount is reached, the oldest backup file will be automaticlly deleted.
Possible time Configurations can be:
- Every Restart
- every 10min
- every 2 hours
- every 2 days
How to insert the backup ?
The System creates a valid SQL File that you can import into your database to restore your data!
Config = {}
Config.BackupPrints = true
Config.Databasename = "YOUR_DATABASE_HERE" --importend for keys and constraints
----------- INFORMATIONS-----------
-- MIN AMOUNTS FOR TIME DIFFERENCES
-- MIN HOUR = 1
-- MIN MINUTE = 10
-- IF YOU USE "m"(minute) or "h"(hour) the script will make a backup after each script restart and after x amount of time you setup
-- If you want to backup only after each script restart you can set Config.TimeDifference = "d" and Config.SaveEveryUnit = 0
-- If you use Config.TimeDifference = "d" and a Config.SaveEveryUnit over 0 the script will backup on the next script restart the after time limit it reached
Config.TimeDifference = "d" -- "d":day, "h":hour, "m":minute
Config.SaveEveryUnit = 1 -- IF "h" MIN AMOUNT 1 , IF "m" MIN AMOUNT 10
Config.MaxBackups = 14
Config.ManualDataseBackupCommand = "dbbackup"
Config.AllowedBackupCommand = { -- INSERT STEAM IDS OF PEOPLE WHO ARE ALLOWED TO DO A DATABASE BACKUP MANUAL WITH COMMAND
'steam:1100001243g2348'
}
| Code is accessible | No |
| Subscription-based | No |
| Lines (approximately) | 600 |
| Requirements | oxmysql |
| Support | Yes |
