datomic

Joe R. Smith 2026-03-04T16:35:35.047159Z

Somewhat perennial question, but does anyone have a good backup solution for Datomic Cloud? Yes I realize the DynamoDB is very reliable and S3 has many nines of reliability as well, but an errant call by a developer, script, or 😨 AI to d/delete-database or a shitty terraform script could spell doom. The database in question has 120M datoms. I’ve done the napkin math and using a tool like fulcrologic/datomic-cloud-backup would take a day to backup and over a month to do a restore. I do need history (and even with fulcrologic/datomic-cloud-backup I lose precise :db/txInstant bc it batches transactions for efficiency). We’re pretty deep w/ the Datomic Cloud / Ion model. While we could probably switch to Datomic Pro, it wouldn’t be fun for us or our customers.

👍 6
cch1 2026-03-05T13:36:10.606259Z

There has been progress here.... We contracted with @kenny last Fall to update and improve https://github.com/kennyjwilli/datomic-backup and we can confirm that it works nicely for dumping a DC database into a fresh copy. Not so much a backup as a replication. We use it to copy a DC database in one AWS account to a fresh copy in another account and we have done that successfully about a dozen times over the past six months. Our source database is almost the exact same size as yours. The copy proceeds through a (REPL) intermediary. There is a mode to incrementally append to the copy, but it has not been battle tested (by us at least). It was added to address the frustration that can come from spending 10 hours making a copy only to have a couple hundred datoms be added to the source that would be really really useful in the copy. We would love to have others use it; kenny and Sun Tribe (RECmint) were totally in sync about making it open source and free.

👀 2
❤️ 1
Max 2026-03-05T14:08:14.826169Z

I wonder if approaching backup from the S3 level would work, you could always just copy the data out of the bucket periodically. You'd have to stop datomic to ensure it’s consistent though

Joe R. Smith 2026-03-05T14:47:25.586119Z

Unfortunately, not all the data is in S3, some is exclusively in DynamoDB.

cch1 2026-03-05T14:52:22.681049Z

Some more info about the approach we are using with @kenny’s tool... to copy (so decant and pour into a fresh db) takes 10 hours for us (100M datoms). We use the current-state-restore option so it does not include history, but you could try the incremental-restore option which does include history (from a given point forward -perhaps Kenny can elaborate). That was the focus of Kenny's most recent work and it was tested once or twice late last year on our db IIRC.

Max 2026-03-05T14:55:11.661649Z

If you're halting writes to clone the s3 bucket, you could just as easily dump the dynamodb tables at the same time

2026-03-24T13:50:12.827689Z

then for some cases of audit trailing is good to have the old db as a reference, right? that's ok :))

👍 1
2026-03-24T01:50:43.950249Z

but we don't have previous retractions with incremental-restore , right?

cch1 2026-03-24T01:57:46.121659Z

IIRC, you will have "previous" retractions as long as they were transacted after the current-state-restore and before the incremental-restore. If that is really important to you, perhaps @kenny can expound on a process to force the current-state-restore to be from t0 (=> nothing) and then apply only incremental restores thereafter. I imagine it would be slow, but it might get you all the history of all your retractions.

👍 1
Joe R. Smith 2026-03-09T18:23:21.800099Z

^ I would love to know if this reliably works.