Score:0

To sync before shapshot or not to sync?

ca flag

There is a Postgres database on BTRFS. I need to make a backup of the database while it is running. Should I do btrfs filesystem sync before the snapshot or btrfs subvolume snapshot does it for me automatically?

djdomi avatar
za flag
what speaks against a mysql dump?
vidarlo avatar
ar flag
@djdomi It being postgresql?
Jonas avatar
ca flag
The database identifies itself as PostgreSQL, there is little I can do.
Score:2
gu flag

From the btrfs-subvolume man page:

Subvolume creation needs to flush dirty data that belong to the subvolume

So yes, btrfs subvolume snapshot will take care of it for you if we stick to your question.

Given that you're attempting to backup a PostgreSQL database, depending on the scenario you might also be interested in the pg_dump utility instead or PostgreSQL WAL-shipping if you need point-in-time recovery.

Jonas avatar
ca flag
I am moving away from pg_dump as it takes too long to restore a large database.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.