Today i create one script in php to backup the database and server files remotely and locally.
I also decided to receive at the end of each backup a notification in a specific room in my discord server saying that the backup was finished successfully.
I also left the possibility to enable/disable certain functions such as if you only want to backup only db/sf or if you don't want to use discord notifications.
Screenshots


Step By Step
- On the game server (FreeBSD) install the zip package using the command: pkg install -y zip.
Upload the script to your web server nd give it permission 777.
Edit the settings with your access data on cron.php.
Access the file from the browser to see if everything is right (yourdomain.com/cron.php?api_protected=Papix).
Now to make the backups automatic just create the cron with the time you want.
- The script is not inserted into the game server (FreeBSD) but into the web server (I use ubuntu).
For security reasons do not forget to change the api key.
Do not store your backups in public directories, store them for example before the /public_html folder.
Make sure that on the web server you use directories that have permissions.
After you created your webhook replace in line 34 (cron.php) with yours.
Download
Continut: Ascuns
Trebuie sa multumesti autorului pentru a putea vedea mesajul.
Trebuie sa multumesti autorului pentru a putea vedea mesajul.

