Giter Site home page Giter Site logo

craftybackupscript's Introduction

CraftyBackupScript

Script to automatically backup any folder, easily and efficiently. Has special features for Minecraft Servers in mind.

Download

Simply download a .zip file from the main repo page or download a more stable release from the Releases Page. (preferred)

Features

  • Compresses entire folder into a 7zip archive, and puts the archive into the specified folder
  • Proper Minecraft save toggling (optional)
  • Optional Minecraft server stopping after backup (best for non-peak hours, to be used with CraftyStartScript for a restart)
  • Keeps track of how long a backup can take
  • Configuration options to tweak the script to your liking (config options inside script)
  • Labels archive with date and time
  • Snapshots of the latest backups.

Instructions

Backups

Edit the "Config" section inside CBS-Backup.py for the server you want to backup. (Completely separate scripts are needed for each different server)

The required sections you need to edit for the script to work are screenName, serverPath, filePath, and the prefix of archiveName. Everything else is up to personal preference.

This script is designed to be ran manually or by a cron job. Configure as needed.

Run with command python3 CBS-Backup.py

Snapshots

The file CBS-Snapshot.py copies all the most recent backups generated by CBS-Backup.py. Making it easier to grab a copy of a live server for development on another computer or to keep the last backups safe from being deleted.

To configure this script, add lines to the bottom specifying the orginal backup save path for each server. Edit the config section as well.

(Example: snapshot("Archives/Creative/"))

This script is meant to be manually triggered as backups are not deleted in the Snapshots folder.

If you want to make the latest snapshot fo all the servers you have, make a shell script triggering every Backup script (example), then trigger both scripts by using command ./backupall.sh; python3 CBS-Snapshot.py

Requirements

  • Python 3 (to run the script)
  • Any plain text editor: Notepad++, TextEdit, or nano will do fine.
  • Linux packages: p7zip, p7zip-full, python3, screen

Notes

Released under the MIT license.

Please report any issues my program may have. Pull requests are welcome too!

Tested with Debian 8 minimal and Ubuntu 14.04 Server. This script was written with only Linux in mind, so any other OS will not be supported.

craftybackupscript's People

Contributors

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