Skip to content

备份数据库和文件夹到阿里云的 OSS/腾讯云 COS/Backblaze b2

License

Notifications You must be signed in to change notification settings

forecho/backup-to-cloud-storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DigitalOcean Referral Badge

Backup to Cloud Storage

Backup your database and files to Cloud Storage.

What can it do?

  • Backup MySQL database
  • Backup directory (multiple)

How to use

Install dependencies

sudo apt-get install zip -y

Install python3

sudo apt-get install python3 python3-pip -y
pip3 install pyyaml
pip3 install oss2 # aliyun oss (optional)
pip3 install cos-python-sdk-v5 # tencent cos (optional)
pip3 install b2sdk # backblaze b2 (optional)

Clone the project

git clone https://github.com/forecho/backup-to-cloud-storage.git

Config

cd backup-to-cloud-storage && cp config.example.yml config.yml

Run

python3 backup.py

Cron

$ crontab -e

add this line

0 2 * * * /usr/bin/python3 /root/backup-to-cloud-storage/backup.py

Thanks

About

备份数据库和文件夹到阿里云的 OSS/腾讯云 COS/Backblaze b2

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages