How to automatic backup cyberpanel website to free cloud (pcloud & storj.io)

Why do I use pcloud and storj.io cloud to back up data for cyberpanel?

1.pcloud.com is free 10GB for free user and easy config for backup

  1. storj.io free 50GB disk and 50GB bw and easy config for backup

lest start

  1. install rclone

curl https://rclone.org/install.sh | sudo bash

  1. register pcloud and config

register link :https://u.pcloud.com/#page=register&invite=JUCL7ZIAycWV

after sigup we are creat pCloud applications

go to https://docs.pcloud.com/my_apps/ to creat

Here, click the New app button to create an application

Enter the app name and grant access to your app then click Add new app to create the app

After completing your application will be created, click on the application name to get Client ID and Secret key

And now we are creat access code

For Rclone to connect with pCloud you will need to create an Access Token. To create your first Access Token visit the link below

https://my.pcloud.com/oauth2/authorize?client_id=CLIENT_ID&response_type=code

Note: Replace CLIENT_ID in the link above with the Client ID of the application you created

swich to login tab and login our account

After successful login, click the Allow button to get Access code

After clicking Allow, you will receive an Access code used to create an Access token for your application. Note Access code will only work for 600 seconds. After you have Access code, you can continue to access the following link

https://api.pcloud.com/oauth2_token?client_id=CLIENT_ID&client_secret=CLIENT_SECRET&code=ACCESS_CODE

Inside:

CLIENT_ID you replace with the Client ID of the application created

CLIENT_SECRET you replace with the Client secret of the application created

ACCESS_CODE replaced with the access code obtained above

Here you will receive an Access token used to connect Rclone to your pCloud. Save this code for use in the next step

Configure VPS backup to pCloud with Rclone

Next you need to configure Rclone to be able to backup VPS to pCloud with Rclone. To connect to pCloud you need to create the file rclone.conf with the following command

mkdir -p /root/.config/rclone

nano /root/.config/rclone/rclone.conf

Note: If you have not installed nano, you need to install nano first, in addition you can use vim to create files.

The content of the config file will be similar to the following

[your backup name]

type = pcloud

client_id = CLIENT_ID

client_secret = CLIENT_SECRET

token = {“access_token”:“ACCESS_TOKEN”,“token_type”:“bearer”}

  1. register storj.io and config

Please watch the video and follow the instructions to register

after you register from storj.io please watch the video and follow the instructions

after you connect storj.io to your vps using rclone please using my simple srcipt to auto backup

if you are edited bash script using notepad++ (windows) you need to use dos2unix to convert to standard linux format to avoid errors.

please see ny guide

sudo yum install dos2unix (centos)

sudo apt-get install dos2unix (ubuntu)

after install run dos2unix backup.sh

and chmod +x backup.sh

after chmod run ./backup.sh to make first backup and test connection

last add crontab for automatic backup

yum install -y nano && EDITOR=nano crontab -e

paste line to terminal

0 2 * * * /root/backup.sh > /dev/null 2>&1

The script runs automatically at 2:00 am. you can change time if you want

on ubuntu

nano /etc/crontab and add the same line

If you see a good article, please like it.

on my next post i guide you to install direct admin nulled lastest version

1 Like