Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Recommended Posts

Hello everyone,

I am excited to share a PHP script I developed to facilitate the backup of both database and server files, allowing for both local and remote storage solutions.

In addition, I integrated a feature that sends a notification to a designated channel on my Discord server once the backup process completes successfully.

The script offers flexibility, allowing you to enable or disable certain functionalities. This means you can choose to back up only your database, your server files, or opt-out of Discord notifications entirely.

Step-by-Step Instructions

  1. Install the Zip Package on Your Game Server: If you’re using FreeBSD, simply run the following command to install the zip package:

     
  • This is the hidden content, please

     

  • Upload the Script: Transfer the PHP script to your web server and ensure that the file permissions are set to 777.

  • Configure the Settings: Edit the cron.php file with your access credentials.

  • Test the Script: Access the script through your browser to verify its functionality. Use this URL format:

     
  1. This is the hidden content, please

     

  2. Set up Automation: To automate the backup process, create a cron job with your preferred schedule.

Important Notes

  • Script Deployment: Keep in mind that the script runs on your web server rather than your game server (I’m using Ubuntu for the web server).
  • Security Precautions: Don’t forget to change the API key for security purposes.
  • Backup Storage: Avoid placing your backups in publicly accessible directories. Instead, store them in a location outside of the /public_html folder.
  • Directory Permissions: Ensure that the directories you utilize on your web server have the appropriate permissions set.

Discord Notification Setup

After you create your webhook, make sure to replace the URL in line 34 of cron.php with your own webhook URL.

 

spacer.png

spacer.png

 

This is the hidden content, please

This is the hidden content, please

This is the hidden content, please

This is the hidden content, please

This is the hidden content, please

Author

Papix

 

Link to comment
Share on other sites


  • 100% changed the title to Automatic Backup System (SF+DB) For Local & Remote Use

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...