Coder Social home page Coder Social logo

backup-rsync's Introduction

Author: Gerald Lim Wee Koon (github: mathscantor)

Before the running the script, please adjust tihe following

Important Parameters to set

Parameters    		Description
----------		-----------
SOURCE_DIR    		Contains the source ip and the directory that you want to backup from. In the above script’s case, our source IP is our dedicated admin link to storage.csnet.lan and /tank is the                         parent directory which contains other sub directories that I want to backup.

BACKUP_DIR    		The directory that will store our backups. Preferably stored under a directory that is owned by root. This is so that chroot environment would work later on when users SFTP in.

LOG_DIR      		The directory that contains our script logs. Useful for debugging and seeing if anything went wrong during the automated backups.

INCLUDELIST_PATH  	Specify which files/directories you want to include in the backup.

EXCLUDELIST_PATH  	Specify which files you want to exclude in the backup

retention    		Specify how many backups we want to keep in BACKUP_DIR

Usage: ./create_new_backup.sh

Upon running the script, rsync will start. There will not be much output on the terminal. For more verbose logs, check under /home/root/rsync_logs.

Command: less -Rr YYYY-MM-DD_hh:mm:ss.log OR Command: cat YYYY-MM-DD_hh:mm:ss.log

Both commands will replay the log output as there is a special ^M character at the end of each verbose line

backup-rsync's People

Contributors

mathscantor avatar

Watchers

 avatar

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.