2019-03-13 02:19:20 -07:00
.. image :: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black
rbackup - An rsync-based backup tool
====================================
2019-04-17 20:33:09 -07:00
2019-04-17 21:00:43 -07:00
Yet another rsync-based tool for automating backups and using plugins.
Rationales
----------
* 'Keep It Simple Stupid'
* Automate as much of the process as possible. This includes options, path selections, and managing snapshots
* Store backups in a format that does not require a program or script; this means that backups can be browsed with a file manager
* Deleted files are kept in old snapshots and rotated out using the rotation script
* Subsequent backups do not touch each other, unless specified by the user. This reduces the risk of overwriting backups with corrupted files
2019-03-13 02:19:20 -07:00
Features
--------
2019-04-17 20:33:09 -07:00
2019-03-13 02:19:20 -07:00
* Snapshot-based backup management
2019-04-17 21:00:43 -07:00
* Creation of installed package lists and archives of package manager databases
* AppArmor profiles
2019-03-17 09:37:40 -07:00
Advanced Features
^^^^^^^^^^^^^^^^^
2019-04-17 20:33:09 -07:00
2019-04-10 19:22:56 -07:00
* rbackup depends on the filesystem that stores the repository to provide features such as checksumming, deduplication, and data integrity verification
* Encryption must be handled by an external program, this is out of scope for rbackup
* xattrs and acl's are handled by rsync but must be a supported feature of the filesystem the repository is stored on
2019-03-13 02:19:20 -07:00
2019-03-13 02:43:28 -07:00
Target Directories
------------------
2019-04-17 20:33:09 -07:00
2019-04-10 19:22:56 -07:00
* /boot/loader
2019-03-13 02:43:28 -07:00
* /etc
* /home
* /root
* /var
2019-04-17 21:00:43 -07:00
2019-03-13 02:43:28 -07:00
* /var/lib
* /var/log
2019-04-17 21:00:43 -07:00
* Plugins
2019-03-13 02:43:28 -07:00
* Installed packages
* Package manager databases
2019-03-13 20:41:40 -07:00
Backup Directory Hierarchy
--------------------------
2019-04-17 20:33:09 -07:00
2019-04-17 21:00:43 -07:00
::
2019-04-17 20:44:17 -07:00
2019-04-17 21:00:43 -07:00
Repository
current -> data/snapshot2
data
snapshot1
.metadata
snapshot2
.metadata
.metadata
2019-04-17 20:44:17 -07:00
2019-04-17 21:00:43 -07:00
Assuming snapshot2 was the most recent backup and snapshot1 was the backup before that:
2019-04-17 20:44:17 -07:00
2019-04-17 21:00:43 -07:00
* "current" would link to snapshot2
2019-03-13 20:41:40 -07:00
* Unchanged files files from snapshot1 backed up to snapshot2 are hardlinked to snapshot1
2019-03-13 02:19:20 -07:00
Implementation Notes
--------------------
2019-04-17 20:33:09 -07:00
2019-03-17 18:21:04 -07:00
* pathlib is used for path handling
2019-04-10 19:22:56 -07:00
* When hardlinking, rbackup passes the entire path to avoid needing relative paths
2019-04-17 21:00:43 -07:00
* The backup script changes the process umask to 0000
2019-03-13 20:41:40 -07:00
To-do
-----
2019-04-17 20:33:09 -07:00
2019-04-23 21:40:31 -07:00
* Make Repositories network-aware. This means we might need to split `` rbackup.struct.repository.Repository `` into a server and client
2019-04-17 21:00:43 -07:00
* Add override for umask i.e. add the command-line options -u, --umask or an option in the config file
2019-04-10 19:22:56 -07:00
* Add __enter__ and __exit__ for PackageManager lockfiles to prevent transactions during backup
2019-04-12 12:03:46 -07:00
* Create snapshot manipulation script
* Interactive cleanup script
2019-04-17 21:00:43 -07:00
2019-04-12 12:03:46 -07:00
* Repository.__delitem__()
2019-04-17 21:00:43 -07:00
* Reconfiguring Repository.snapshot_symlink whenever a snapshot is deleted
2019-04-10 19:22:56 -07:00
2019-04-23 21:40:31 -07:00
* Plugin API
* Plugin.run() and Plugin.communicate() abstract methods
* Plugin.run() is passed a set of specific arguments
* snapshot?
2019-04-10 19:22:56 -07:00
Dependencies
------------
2019-04-17 20:33:09 -07:00
2019-04-10 19:22:56 -07:00
Runtime
^^^^^^^
2019-04-17 20:33:09 -07:00
2019-04-17 21:00:43 -07:00
* python>=3.7
2019-04-10 19:22:56 -07:00
* rsync
Build/Testing
^^^^^^^^^^^^^
2019-04-17 20:33:09 -07:00
2019-04-14 12:56:11 -07:00
* pytest
2019-04-10 19:22:56 -07:00
* setuptools
* hypothesis
2019-04-19 07:57:07 -07:00
-------
License
-------
This project is licensed under MIT. See LICENSE for more details.