With this script, you can backup important information such as database from the x-ui, marzban, and hiddify panels and send it to Telegram with the help of the Telegram bot so that it is always available!
First, you run this command on your server
bash <(curl -Ls https://github.com/AC-Lover/backup/raw/main/backup.sh)
Then it asks us for bot token, you have to create a bot from https://t.me/BotFather and give the token
Then it asks us for a chat ID, and to get your chat ID or the channel you set aside for backup, you must forward a message from yourself or the channel to this https://t.me/userinfobot bot, which will give you a chat ID.
The next step asks you for a caption, which you can leave blank
The next step asks you to run a cron job to determine when the robot will back up and send
whose format is like this: integer
The value is the minute
The minimum number for minutes is 1 and the maximum is 1440
e.g 60 (for every one hour) 1440 (for every one day) 10 (for every ten minutes)
The next step will ask you which panel you want to backup
You have to choose one from marzbn, x-ui, and hiddify
The value of m means marzban, the value of x means x-ui, and the value of h means hiddify
Enter an option between x/m/h as per your requirement
Then it will ask you if you want to delete the previously defined cron jobs or not?
Enter y if you want it to be cleared otherwise enter n
If you have entered everything correctly, the backup file should be sent to you once, otherwise there is a problem in this process and you can raise your problem from the issues
sudo crontab -l | grep -vE '/root/ac-backup.+\.sh' | crontab -
I used the translator and if I have gramme problem please help me to improve it
Also, I have tested this script only on Ubuntu and developers can help us to develop this script for other operating systems.
https://nowpayments.io/donation/ACLover