I understand that Atlassian recommends shutting off Stash before taking backups to ensure data consistency.
I was thinking about using filesystem snapshotting as part of a live backup policy. If the git repositories and [PostgreSQL] database all reside on the same ZFS volume, and if I take a ZFS snapshot of that volume, and would I be able to restore that snapshot, and would the restored data be consistent and usable by Stash?
That is the nature of filesystem snapshots, you don't know about the data consistency of open files. I would recommend using a script to perform a pgdump first, then you can perform a filesystem snapshot. I am not sure about the rest of the open files, but I think that you should be able to replace / rebuild them if they are corrupted.
Thanks for your response. I wanted to take a single filesystem snapshot, including WAL logs, both for convenience and also to try to keep the database and git repos as close in sync as is reasonably possible. According to the PostgreSQL documentation and what I believe to be true about ZFS snapshots and git, and assuming fsync()s work all the way down to the disks, I believe that restoring such a snapshot should be like recovering from a power outage:
We'll schedule our backups around a time of day with the least amount of activity to avoid such data loss.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs