Jump to content

Advanced Automatic Backup (SF+DB)(Local+Remote)


Recommended Posts

Hello community,

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
oActdab.png
0RReeab.png


Step By Step

  1. On the game server (FreeBSD) install the zip package using the command: pkg install -y zip.
  2. Upload the script to your web server nd give it permission 777.
  3. Edit the settings with your access data on cron.php.
  4. Access the file from the browser to see if everything is right (yourdomain.com/cron.php?api_protected=Papix).
  5. Now to make the backups automatic just create the cron with the time you want (in case you don't know see this topic that I left at the end of this)

Notes

  • 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.


Discord Notification
After you created your webhook replace in line 34 (cron.php) with yours.

 


Download

This is the hidden content, please


 

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Metin2 Dev 17
  • Good 4
  • Love 2
  • Love 8
Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.