Hi Mr/Ms/Msr Tomaselli, and thanks! That's a fair question, and you're right that the core idea is genuinely that simple. Hard-linked snapshots are a well-working trick, and for a single local directory your two lines capture the essence of it.

What Moraine adds is everything around that kernel that turns it into a robust, general-purpose tool rather than a personal script:

Remote-first. cp -ral is local-only. The common backup case is a remote NAS/server, so Moraine uses rsync --link-dest=../latest over SSH. The hard-linking happens on the destination in a single pass, with no full-tree pre-copy and no separate ssh cp -ral step. It also updates the latest symlink atomically so an interrupted run can't leave a half-built snapshot referenced.

Retention/pruning (GFS). Snapshots otherwise grow without bound. Moraine keeps N latest plus newest-per-day/week/month and auto-prunes after a successful run.

Restore. Browsing a snapshot's tree and pulling back individual files or whole trees to the client, never touching the destination. The two-liner leaves you to do that by hand.

A second backend. Besides rsync/SSH it drives rclone (SFTP, SMB, WebDAV, S3, cloud), where --link-dest doesn't exist and you instead need server-side --copy-dest with capability detection. "rsync/rclone" hides a real difference in how snapshotting has to work.

The boring-but-important bits: declarative config with multiple targets and validation; a pre-flight check (key, connection, dest writable) before anything runs; a run log; correct exit codes; exclude patterns; SSH key-passphrase handling; crontab Windows Task Scheduler generation; and a GTK desktop app for people who don't live in a terminal.

So the honest framing is: the snapshot mechanism is a few lines, but a packaged tool is the part that makes it safe, remote, prunable, restorable and usable by non-experts.

Happy to trim the scope if you feel a piece doesn't belong in the initial upload.

Thanks again for the review,
Jonaz

On 6/30/26 12:59, Salvo Tomaselli wrote:
Hello,

can you explain what is the advantage of using this over a 2 lines
script like this?

cp -ral directory "snapshot-$(date)"
rsync/rclone directory

Best

Il giorno mar 30 giu 2026 alle ore 07:38 Thern AI Solutions
<[email protected]> ha scritto:
Package: wnpp
Severity: wishlist
Owner: Jonaz Thern [email protected]
X-Debbugs-Cc: [email protected], [email protected]

Package name: moraine
Version: 0.1.1
Upstream Author: Jonaz Thern [email protected]
URL: https://github.com/TheJonaz/moraine-backup
License:  MIT
Programming Lang: Rust
Description: snapshot backup over SSH/rsync and rclone

Moraine creates timestamped, hard-linked snapshots: each backup run
looks like a complete tree, but unchanged files share disk via hard
links, so history costs almost nothing. It restores individual files or
whole trees, prunes old snapshots with a GFS retention policy, and keeps
a run log.


Backends: rsync over SSH, and rclone (cloud, SFTP, SMB, WebDAV, S3, ...).


The package provides both the command-line client (moraine) and the GTK
4 desktop application (moraine-gui), built from one source against
Debian's GTK 4 crates.


I am the upstream author and intend to maintain the Debian package,
ideally within the Debian Rust Maintainers team. I will need a sponsor
for the initial upload.



Reply via email to