script created by me
full tutorial is on drive drive
1. Download the file autobackup.sh
3. Open the file and replace the "name" to the name of your backup file center that will be used when transferring files to Google Drive
//Your Backup Data Name, replace this
name
//
chmod +x ./autobackup.sh
./autobackup.sh
5. then if the script is running successfully, a link will appear that will ask you to connect the account that will be used to backup files.
- Create the file backup.sh
- Then copy this script and paste in file backup.sh
date=$(date +%d-%m-%y)
zip -r namafile-$date.zip /root/directory/
rclone copy namafile-$date.zip name:
rm namafile-$date.zip
change the "namefile" to the name of the file to be backed up and which will appear on google drive
change the /root/directory/ to the folder location that will be automatically zipped
change the "name" to the name you entered in the third step (step ketiga)
- Save the file and run the script:
chmod +x ./backup.sh
apt-get install cron
crontab -e
1
then paste this script outside # or at the bottom
* 7 * * * bash /root/backup.sh
- 7 * * * Means that the script will automatically run every 7 am, or the file will be transferred to Google Drive every 7 am
- And save the file
if you use the editor from vps then run CTRL+X then Y, to save the changes
rclone mkdir name:/namaFolder
replace "name" to your backup file center name in step 3
rclone copy namafile.zip name:
replace "name" to your backup file center name in step 3
change the "namafile" to the name of the file you want to copy into google drive
rclone copy name:/namafile.zip /root/
replace "name" to your backup file center name in step 3
change the "namafile" to the name of the file you want to copy into google drive
change the "root" to where the file you want to put the download
rclone ls name:
replace "name" to your backup file center name in step 3
if the method above doesn't work or error, use a manual script.
apt update && apt upgrade
curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip
unzip rclone-current-linux-amd64.zip
cd rclone-*-linux-amd64
cp rclone /usr/bin/
chown root:root /usr/bin/rclone
chmod 755 /usr/bin/rclone
cd
rclone config
n
enter.
name
drive
enter.
enter.
1
enter.
enter.
n
- then if the script is running successfully, a link will appear that will ask you to connect the account that will be used to backup files.
- copy the code in your chrome and paste to vps