123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #!/bin/bash
- red='\e[1;31m'
- green='\e[0;32m'
- NC='\e[0m'
- MYIP=$(wget -qO- https://icanhazip.com);
- echo "Checking VPS"
- IP=$(wget -qO- https://icanhazip.com);
- date=$(date +"%Y-%m-%d")
- clear
- echo " Enter Your Email To Receive Message"
- read -rp " Email: " -e email
- sleep 1
- echo Membuat Directory
- mkdir /root/backup
- sleep 1
- echo Start Backup
- clear
- cp /etc/passwd backup/
- cp /etc/group backup/
- cp /etc/shadow backup/
- cp /etc/gshadow backup/
- cp -r /etc/wireguard backup/wireguard
- cp /etc/ppp/chap-secrets backup/chap-secrets
- cp /etc/ipsec.d/passwd backup/passwd1
- cp /etc/shadowsocks-libev/akun.conf backup/ss.conf
- cp -r /var/lib/premium-script/ backup/premium-script
- cp -r /home/sstp backup/sstp
- cp -r /etc/v2ray backup/v2ray
- cp -r /etc/trojan backup/trojan
- cp -r /usr/local/shadowsocksr/ backup/shadowsocksr
- cp -r /home/vps/public_html backup/public_html
- cd /root
- zip -r $IP-$date.zip backup > /dev/null 2>&1
- rclone copy /root/$IP-$date.zip dr:backup/
- url=$(rclone link dr:backup/$IP-$date.zip)
- id=(`echo $url | grep '^https' | cut -d'=' -f2`)
- link="https://drive.google.com/u/4/uc?id=${id}&export=download"
- echo -e "SUCCESSFULL BACKUP YOUR VPS
- Please Save The Following Data
- ============================================
- Your VPS IP : $IP
- Link Backup : $link
- ============================================
- Please enter the link above If you want to restore data
- © Copyright 2021 By OKKAY-KAYYO" | mail -s "Backup Data" $email
- rm -rf /root/backup
- rm -r /root/$IP-$date.zip
- echo ""
- figlet -c DONE | lolcat
- echo "Please Check Your Email"
- echo ""
|