Giter Site home page Giter Site logo

zipbackup's Introduction

ZipBakcup

A utility program for one-directional sync to zip archives. Requires .NET 6 on Windows to run.

I created this program for my own data backup needs (photos, docs, etc.). Backed-up data are zipped and optionally split into multiple file segments for easier transfer afterwards (e.g. upload to an online drive).

Specifically, say we're trying to backup everything in directory D:\Photos to Z:\Backup\Current\D\Photos. This program will create a series of file named Z:\Backup\Current\D\Photos\Contents.####.zip where #### is a token automatically generated based on current month, meaning a new zip archive will be created once we step into another month/year. This is to prevent rewriting the entire zip archive during periodic backup, especially when the directory contains a lot of ancient files while still being constantly added with new ones. The archive files are designed to recover the same directory structure when unzipped altogether. Old archive files may still be modified in case where files need to be deleted.

This program is NOT thoroughly tested. Use at your own risk.

Usage

ZipBackup <config.yaml>

Config File Spec

- RootFrom: C:\
  RootTo: Current\C         # Equivalent to "Z:\Backup\Current\C" if this config
                            #   file locates in "Z:\Backup"
  SplitSize: 4290772992     # Split output zip archive into files of ≤ 3.99 GB
  CompressionLevel: Level3  # As defined in enum Ionic.Zlib.CompressionLevel

  Add:                      # Only dirs in "C:\" listed below will be backed-up
  - C:\Users\User\Desktop   # Create backup files to
                            #   "Current\C\Users\User\Desktop\Contents.####.zip"
  - C:\Users\User\Documents\TencentMeeting
  - C:\Users\User\Documents # Ignores contents in "TencentMeeting" as those are
                            #   already handled separately in the previous item
  - C:\Users\User\Downloads

  Ignore:
  - C:\Users\User\Documents\Cache

- RootFrom: D:\             # Another config item with slightly different settings
  RootTo: Current\D
  SplitSize: 4290772992
  CompressionLevel: Level6

  Add:
  - D:\Git
  - D:\Git\*                # This will backup every folder separately
  - D:\Games
  - D:\Games\*

  Ignore: []

zipbackup's People

Contributors

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