84 lines
2.3 KiB
Plaintext
84 lines
2.3 KiB
Plaintext
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
|
|
:target: https://github.com/ambv/black
|
|
|
|
rbackup - An rsync-based backup tool
|
|
====================================
|
|
A tool that automates the use of rsync and extra features for package manager backups.
|
|
|
|
Features
|
|
--------
|
|
* Snapshot-based backup management
|
|
* Backups of deleted and modified files
|
|
* Creation of installed package lists and backup of package manager databases
|
|
|
|
Advanced Features
|
|
^^^^^^^^^^^^^^^^^
|
|
* 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
|
|
|
|
Target Directories
|
|
------------------
|
|
* /boot/loader
|
|
* /etc
|
|
* /home
|
|
* /root
|
|
* /var
|
|
* /var/lib
|
|
* /var/log
|
|
* Extras
|
|
* Installed packages
|
|
* Package manager databases
|
|
|
|
Backup Directory Hierarchy
|
|
--------------------------
|
|
basedir
|
|
├── current
|
|
└── data
|
|
├── snapshot-one
|
|
│ ├── boot
|
|
│ ├── etc
|
|
│ ├── home
|
|
│ ├── pkg
|
|
│ └── root
|
|
└── snapshot-two
|
|
├── boot
|
|
├── etc
|
|
├── home
|
|
├── pkg
|
|
└── root
|
|
|
|
* Assuming snapshot2 was the previous backup and snapshot1 was the backup before that:
|
|
* current would link to snapshot2
|
|
* Unchanged files files from snapshot1 backed up to snapshot2 are hardlinked to snapshot1
|
|
|
|
Implementation Notes
|
|
--------------------
|
|
* pathlib is used for path handling
|
|
* Only absolute paths are used internally for consistency
|
|
* Use --link-dest=
|
|
* When hardlinking, rbackup passes the entire path to avoid needing relative paths
|
|
* The backup script changes the process umask to 0000 to determine the file modes for the files it writes i.e. snapshots
|
|
|
|
To-do
|
|
-----
|
|
* Add __enter__ and __exit__ for PackageManager lockfiles to prevent transactions during backup
|
|
* Create snapshot manipulation script
|
|
* Interactive cleanup script
|
|
* Repository.__delitem__()
|
|
* Repository.delete_snapshot(name)
|
|
* Test functions in config module
|
|
* load_list_from_option()
|
|
|
|
Dependencies
|
|
------------
|
|
Runtime
|
|
^^^^^^^
|
|
* rsync
|
|
|
|
Build/Testing
|
|
^^^^^^^^^^^^^
|
|
* pytest
|
|
* setuptools
|
|
* hypothesis
|