[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Duplicity-talk] Soft-atomic Script
From: |
Jacob Godserv |
Subject: |
[Duplicity-talk] Soft-atomic Script |
Date: |
Sat, 7 Apr 2012 18:35:56 -0400 |
Duplicity still has some suspend/resume bugs. It doesn't always
properly recover from getting shut down unexpectedly. On top of this,
duplicity also has some severe "clean --force" bugs. Duplicity will
delete files it shouldn't (usually after a failed backup), completely
destroying the entire primary chain.
In my case, I have duplicity running via a cron job every hour, like
Time Machine in OSX, so there are times where I'll turn off my
computer and it'll be right in the middle of a backup. At first, I
used clean --force automatically to have Duplicity restart the backup.
(I distrust the resume feature; sorry.) However, as I mentioned, this
sometimes creates a completely broken Duplicity store folder.
I've posted here for help on these bugs, but since I got no response,
I decided to create a workaround. I'm sure others are dealing with
similar issues.
The attached script is not bullet proof, but on my personal Gentoo
box, it's performed admirably. Duplicity has yet to report any issues.
The usage is extremely simple, and will be familiar to anyone who's
ever used a database:
--begin
Mark this as the beginning of what should be an atomic transaction
--commit
Mark the transaction as successful and keep all the files created.
--rollback
Mark the transaction as a failure and delete any files created.
The script only handles created files. It won't handle renames,
deletions, or modifications, but since Duplicity only ever creates,
this should be fine.
--
Jacob
"For then there will be great distress, unequaled
from the beginning of the world until now — and never
to be equaled again. If those days had not been cut
short, no one would survive, but for the sake of the
elect those days will be shortened."
Are you ready?
soft-atomic.sh
Description: Bourne shell script
- [Duplicity-talk] Soft-atomic Script,
Jacob Godserv <=