Skip to main content

Incremental file backup tool

Project description

Incremental Backup Tool (MK 2)

by Reece Jones

Purpose

Unlike Linux, which has awesome tools like rsync, Windows does not seem to have a good selection of free backup tools. There is the Windows system image backup, but that does full backups only. There is also File History, but that is janky and largely opaque.

Thus, I created this tool. Some of its design goals are:

  • free, open source
  • as simple as possible (no installation, no GUI, no fluff)
  • robust
  • fast
  • efficient
  • transparent backup format

This project is a successor to my initial attempts at an incremental backup tool for Windows, available here.
Please see ChangesFromOriginal.md for details.
If you have used the original incremental backup tool, please note that this version is NOT backwards compatible with the original.

Disclaimer

This application is intended for low-risk personal use. I have genuinely tried to make it as robust as possible, but if you use this software and lose all your data as a result, that's not my responsibility.

Requirements

  • Windows or Linux system
  • Python 3.9 or newer
  • [Only for testing] Pytest (any recent version should do)

Application Structure

Important files and directories:

  • incremental_backup/ - The Python package.
    • backup/ - High-level backup functionality.
    • cli/ - Command line interface functionality (see also the Usage section).
    • meta/ - Functionality related to backup metadata and structure.
    • __main__.py - Entrypoint for using the command line interface via the package name.
    • restore.py - Backup restoration functionality.
  • test/ - Test code. Each directory/file corresponds to the module in incremental_backup/ it tests.

The incremental_backup Python package contains all application functionality and can be easily used in a library-like manner. Additionally, this package doubles as the application entrypoint.

Usage

The Python package is executable via a command line interface. The interface uses multiple "commands" for different functionality. Usage is as follows:

python3 -m incremental_backup <command> <command_args>

(You may have to adjust the Python command based on your system configuration.)

Commands:

To start using this application, you probably want to have a look at BackupUsage.md.

Program Exit Codes

  • 0 - The operation completed successfully, possibly with some warnings (i.e. nonfatal errors).
  • 1 - The command line arguments are invalid.
  • 2 - The operation could not be completed due to a runtime error (typically would be a file I/O error).
  • -1 - The operation was aborted due to a programmer error - sorry in advance.

Running Tests

With your working directory as the project root directory:

python3 -m pytest

This runs a suite of unit and integration tests.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

incremental_backup-0.0.1.tar.gz (41.3 kB view hashes)

Uploaded Source

Built Distribution

incremental_backup-0.0.1-py3-none-any.whl (46.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page