(no title)
basnijholt | 2 years ago
I'm excited to share my recent project, where I took on the challenge of porting a popular but untested 600+ line Bash script to Python. The outcome is [`rsync-time-machine.py`](https://github.com/basnijholt/rsync-time-machine.py), a Python implementation of the [`rsync-time-backup`](https://github.com/laurent22/rsync-time-backup) script. It provides Time Machine-style backups using rsync and creates incremental backups of files and directories to the destination of your choice.
The tool is designed to work on Linux, macOS, and Windows (via WSL or Cygwin). Its advantage over Time Machine is its flexibility - it can backup from/to any filesystem and works on any platform. You can also backup to a Truecrypt drive without any issues.
Unlike the original Bash script, `rsync-time-machine.py` is fully tested. It has no external dependencies (only requires Python ≥3.7), and it is fully compatible with [`rsync-time-backup`](https://github.com/laurent22/rsync-time-backup). It offers pretty terminal output and is fully typed.
Key features include:
* Each backup is in its own folder named after the current timestamp. * Backup to/from remote destinations over SSH. * Files that haven't changed from one backup to the next are hard-linked to the previous backup, saving space. * Safety check - the backup will only happen if the destination has explicitly been marked as a backup destination. * Resume feature - if a backup has failed or was interrupted, the tool will resume from there on the next backup. * Exclude file - support for pattern-based exclusion via the `--exclude-from` rsync parameter. * Automatically purge old backups based on a configurable expiration strategy. * "latest" symlink that points to the latest successful backup.
To learn more about how to use and install `rsync-time-machine.py`, check out the [GitHub repo](https://github.com/basnijholt/rsync-time-machine.py).
I appreciate any feedback and contributions! Feel free to file an issue on the GitHub repository for any bugs, suggestions, or improvements. Looking forward to hearing your thoughts.
Happy backing up!
Please, do let me know if you have any questions or need any further information.
pwg|2 years ago
Gys|2 years ago
pyuser583|2 years ago