Skip to content

wayangkulit95/autobackup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

This Is Script Auto Backup in VPS

script created by me
full tutorial is on drive drive

How To Run The script?

1. Download the file autobackup.sh
2. Put the autobackup.sh file into the vps
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
//
4. Save Changed and Run the script:
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.
6. copy the code in your chrome and paste to vps

How to set the AUTOMATICALLY / Auto Backup

  1. Create the file backup.sh
  2. 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)

WARNING!!! Don't replace what I didn't tell you to change

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

gambar

  • 7 * * * Means that the script will automatically run every 7 am, or the file will be transferred to Google Drive every 7 am
  1. And save the file

if you use the editor from vps then run CTRL+X then Y, to save the changes

Command Manual RCLONE

Create A Folder

rclone mkdir name:/namaFolder

replace "name" to your backup file center name in step 3

Copy File To Google Drive

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

Download files from Google Drive to your vps

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

Check the files in Google Drive

rclone ls name:

replace "name" to your backup file center name in step 3

Manual:

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.

replace "name" to your backup file center name.

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages