Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaxvanyang/dotbackup
YAML config based backup utility.
https://github.com/jaxvanyang/dotbackup
backup dotbackup dotfiles yaml
Last synced: 1 day ago
JSON representation
YAML config based backup utility.
- Host: GitHub
- URL: https://github.com/jaxvanyang/dotbackup
- Owner: jaxvanyang
- License: mit
- Created: 2023-12-13T08:38:17.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-07T12:38:34.000Z (11 months ago)
- Last Synced: 2024-04-07T14:43:09.522Z (11 months ago)
- Topics: backup, dotbackup, dotfiles, yaml
- Language: Python
- Homepage: https://pypi.org/project/dotbackup
- Size: 56.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dotbackup

[](https://pypi.org/project/dotbackup)
[](https://pypi.org/project/dotbackup)
[](https://aur.archlinux.org/packages/dotbackup)[](https://github.com/psf/black)
[](https://github.com/PyCQA/flake8)
[](https://pycqa.github.io/isort)
[](https://pytest.org)
[](https://codecov.io/gh/jaxvanyang/dotbackup)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)](dotbackup.1.adoc)
and [dotsetup(1)](dotsetup.1.adoc) for details.## Highlights
- Simple configuration.
- Custom hooks.
- Detailed logs.## Installation
You can install it from one of these package managers:
- [PyPI](https://pypi.org/project/dotbackup)
- [AUR](https://aur.archlinux.org/packages/dotbackup)If you are using a Debian-based system, you can install the pre-built deb
package from [the latest release](https://github.com/jaxvanyang/dotbackup/releases/latest).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](./src/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`:
```yml
backup_dir: ~/backup
apps:
vim:
files: [~/.vimrc]
nvim:
files:
- ~/.config/nvim/init.lua
- ~/.config/nvim/lua
```Do backup:
```console
$ 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:
```console
$ 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)](dotbackup.1.adoc) and [dotsetup(1)](dotsetup.1.adoc).
## Show Your Support
If you're using dotbackup, consider adding the badge to your project's `README.md`:
```
[](https://github.com/jaxvanyang/dotbackup)
```[](https://github.com/jaxvanyang/dotbackup)