Skip to main content

YAML config based backup utility. Easy to use yet flexible. With a primary focus on dotfile backup & setup, but not limited to dotfiles.

Project description

dotbackup

PyPI - Python Version PyPI - Version PyPI - Downloads AUR version

Code style: black Lint: flake8 Imports: isort Test: pytest Codecov

Usually people maintain backup and setup scripts along with their dotfiles. But these scripts always contain a lot of repeat codes, and writing them is not fun! dotbackup and dotsetup are here to help.

With these two tools, you only need to write a simple configuration and they will know how to back up and set up your dotfiles. You can read dotbackup(1) and dotsetup(1) for details.

Highlights

  • Simple configuration.
  • Custom hooks.
  • Detailed logs.

Installation

You can install from one of these package managers:

Installing from a package manager gives you the two commands - dotbackup and dotsetup, and the manpages. But you can also download this single script: dotbackup.py. In fact, dotbackup and dotsetup are just shortcut commands of dotbackup.py, which means that dotbackup is equivalent to dotbackup.py backup and dotsetup is equivalent to dotbackup.py setup.

Quick Start

Write a simple configuration and place it to ~/.config/dotbackup/dotbackup.yml:

backup_dir: ~/backup
apps:
  vim:
    files: [~/.vimrc]
  nvim:
    files:
      - ~/.config/nvim/init.lua
      - ~/.config/nvim/lua

Do backup:

$ dotbackup
INFO: doing vim backup...
INFO: copying ~/.vimrc to /home/user/backup/.vimrc...
INFO: doing nvim backup...
INFO: copying ~/.config/nvim/init.lua to /home/user/backup/.config/nvim/init.lua...
INFO: copying ~/.config/nvim/lua to /home/user/backup/.config/nvim/lua...

Do setup:

$ dotsetup
INFO: doing vim setup...
INFO: copying /home/user/backup/.vimrc to /home/user/.vimrc...
INFO: doing nvim setup...
INFO: copying /home/user/backup/.config/nvim/init.lua to /home/user/.config/nvim/init.lua...
INFO: copying /home/user/backup/.config/nvim/lua to /home/user/.config/nvim/lua...

Documentation

For more information, please read dotbackup(1) and dotsetup(1).

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

dotbackup-1.2.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

dotbackup-1.2.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file dotbackup-1.2.0.tar.gz.

File metadata

  • Download URL: dotbackup-1.2.0.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for dotbackup-1.2.0.tar.gz
Algorithm Hash digest
SHA256 264f6e136a36b7696e8a9b6671a0222fd16d6c2c0a3c604442970c388b19e424
MD5 eadca5cb570c88546254e8919f706dbd
BLAKE2b-256 af6c41176b61abf00a40736e9719e175de6515fc6d60b76d1536e6eaa8091c8f

See more details on using hashes here.

Provenance

File details

Details for the file dotbackup-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: dotbackup-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for dotbackup-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bccd400807a224fab4e0acb75219f09d539a1dc3eacf1eb7cd682792320030bd
MD5 ba4216d679f8f941473bc5536cb1882d
BLAKE2b-256 940ea9b28bcea5f3be1b7c439e34409f5810be09e98b5cfa68eff6ab4c1e9286

See more details on using hashes here.

Provenance

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