Backupcpy is a tiny and elegant backup archive assembler
Project description
backupcpy
backupcpy
is a tiny and elegant backup archive assembler implemented in less than 300 lines of Python code. It is
designed to assemble lists of files and create archives. That is all it does.
- Simple YAML based configuration.
- Support for collections of files producing separate archives.
- Point-in-time tarballs (.tar.gz, tar.xz, tar.bz2).
- Support for uncompressed archives (plain tarballs).
- Ability to ignore files using Unix shell-style wildcards.
Requirements
You should have Python3 and pip3 installed on your system. Python 2 is not supported and will not work.
Installation
You can install backupcpy
using pip - sudo pip3 install backupcpy
Backup manifest
Backup manifest is a file that contains lists directory and file paths you want to archive - collections. Each collection can have any number of files and directories attached to it and each collection produces a single backup archive.
By default, backupcpy will look for a file called .backupcpy.yml
in your home directory. You can tell it to
use a different file using --manifest
command line option.
Manifest entries will also have some basic placeholders available for you to use.
Example manifest
# Example configuration file for backupcpy
#
# Available placeholders:
# {{now}} - current datetime in format %Y%m%d-%H%M%S-%f
# {{cwd}} - current working directory
# {{home}} - home directory of the current user
# {{user}} - username of the current user
# Global ignore - matches in ALL collections
# The format is Unix shell-style wildcards.
# Ignore is matched against absolute resolved path of each file.
# This works slightly differently than .gitignore.
ignore:
- '*node_modules*' # Anywhere in the path
# Collections of things to backup
collections:
personal:
# What compression to use 'none', 'gz', 'xz', 'bz2'
compress: 'gz'
# Where to store backup archives (absolute path)
target: '/mnt/backup-drive'
# Ignore for current collection
ignore:
- '*.git*'
- '*.idea*'
# Items to backup - files, directories.
# Defined using glob format.
# Tilde is ignored - use {{home}} instead.
items:
- '{{home}}/Documents/**'
- '{{home}}/Images/**'
- '{{home}}/My Projects/**'
Usage
backupcpy [-h] [--manifest MANIFEST] [--verbose] [--debug] [--quiet] collection [collection ...]
To create backup archives you need to invoke the backupcpy
command line tool and provide it with list of names of the
collections you want to create archives for.
You can optionally change status output modes and provide a different location for the backup manifest.
For example:
backupcpy personal projects other
Why?
I needed a simple tool to assemble point-in-time backups. I use backupcpy
to assemble backup archives which are
then automatically rsync'd to hot and cold networked storage.
If you are looking for a fully fledged backup system, you might want to look at Borg, Bacula or git-annex.
License
Licensed under terms and conditions of Apache 2.0 license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file backupcpy-1.0.0.tar.gz
.
File metadata
- Download URL: backupcpy-1.0.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43a226e40a90e5438b7594a2bbfa20e1b0f52b3bdfc3d0eea56347fd4984d558 |
|
MD5 | 813f7d0761620260deb695a530e72ba4 |
|
BLAKE2b-256 | 9f0fa3fd7820d5c7d5cecdd9c93ce897880f5ef1adaef2b05cd7a8152465449a |