Giter Club home page Giter Club logo

backup2cloud's Introduction

Backup2Cloud

新版本備份工具,使用 rclone 來處理備份雲端的部分。備份邏輯與前一版本 VPSBackupToS3 最大的差異就是抽離備份目的地設定,和 s3cmd 工具解構與使用純 bash script 改寫。

相依套件

  • rclone
  • MySQL Client command line tools

使用方法

  1. 安裝 rclone

    curl https://rclone.org/install.sh | sudo bash
  2. 複製本專案至備份裝置,設定各項設定檔案

    git clone https://github.com/nczz/Backup2Cloud.git && cd Backup2Cloud && current_dir=`pwd` && sed -i 's|CURRENT_PATH|'$current_dir'|g' Backup2Cloud.sh
    • Backup2Cloud.sh 設定備份天數、備份網站與資料庫資訊、異地備份位置(以 AWS S3 為例)。
    • rclone.conf 設定 rclone 參數。
    • db_ignore.txt 設定不要備份的資料庫,一行一個。
    • www_ignore.txt 設定不要備份的網站目錄,一行一個。
  3. 加入 crontab 每天凌晨進行備份

    crontab -e
    # chmod +x Backup2Cloud.sh
    # 0 2 * * * /bin/bash /path/to/Backup2Cloud.sh > /path/to/backup.log 

授權

MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.