rbackup/README

85 lines
2.3 KiB
Plaintext
Raw Normal View History

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-03-17 09:37:40 -07:00
A tool that automates the use of rsync and extra features for package manager backups.
2019-03-13 02:19:20 -07:00
Features
--------
* Snapshot-based backup management
* Backups of deleted and modified files
2019-03-17 09:37:40 -07:00
* Creation of installed package lists and backup of package manager databases
Advanced Features
^^^^^^^^^^^^^^^^^
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-10 19:22:56 -07:00
* /boot/loader
2019-03-13 02:43:28 -07:00
* /etc
* /home
* /root
* /var
* /var/lib
* /var/log
* Extras
* Installed packages
* Package manager databases
2019-03-13 20:41:40 -07:00
Backup Directory Hierarchy
--------------------------
2019-04-10 19:22:56 -07:00
basedir
├── current
└── data
├── snapshot-one
│   ├── boot
│   ├── etc
│   ├── home
│   ├── pkg
│   └── root
└── snapshot-two
├── boot
├── etc
├── home
├── pkg
└── root
2019-03-13 20:41:40 -07:00
* Assuming snapshot2 was the previous backup and snapshot1 was the backup before that:
2019-04-10 19:22:56 -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
--------------------
* pathlib is used for path handling
2019-04-12 12:03:46 -07:00
* Only absolute paths are used internally for consistency
2019-03-13 02:19:20 -07:00
* Use --link-dest=
* Use --suffix=, --backup, and --backup-dir=
2019-04-10 19:22:56 -07:00
* When hardlinking, rbackup passes the entire path to avoid needing relative paths
2019-03-13 20:41:40 -07:00
To-do
-----
* Use --suffix=, --backup, and --backup-dir=
2019-04-12 12:03:46 -07:00
* Create config module
2019-04-10 19:22:56 -07:00
* Study how snapshots behave when --delete is passed
* 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
* Repository.__delitem__()
* Repository.delete_snapshot(name)
2019-04-10 19:22:56 -07:00
Dependencies
------------
Runtime
^^^^^^^
* rsync
Build/Testing
^^^^^^^^^^^^^
2019-04-14 12:56:11 -07:00
* pytest
2019-04-10 19:22:56 -07:00
* setuptools
* hypothesis