1.1 KiB
1.1 KiB
title | date | draft | layout | projtags | license | source | summary | ||
---|---|---|---|---|---|---|---|---|---|
Hydrus Sync Client | 2022-10-12 | false | project |
|
GPLv3 | https://codeberg.org/redstrate/hydrussyncclient/ | Sync hydrus databases using rsync. |
Ever feel like you need a way to sync Hydrus databases across multiple machines? With hydrus-sync-client
, you can
easily synchronize your Hydrus database with a rsync server. This was originally a Bash script that I decided to rewrite in Rust, so it's pretty ugly.
Process
- The program first checks the last hostname that synchronized, this is used later to decide whether to sync first.
- Then the lockfile is checked, if it is locked - the program exits.
- If the hostnames don't match, we sync the files before launching.
- Hydrus is launched and you can continue like normal.
- Once Hydrus is closed, the file synchronization now happens in reverse.
- Before the program exits, the lockfile is reset and the last hostname is updated.
As long as you ensure you're always using hydrus-sync-client
to run Hydrus, the sync process is mostly foolproof.