masc3d / btrfs-sxbackup

Incremental btrfs snapshot backups with push/pull support via SSH
GNU General Public License v2.0
117 stars 20 forks source link

Individual commands for local (`snapshot`) and remote transfer (`sync`) #50

Open lkraav opened 5 years ago

lkraav commented 5 years ago

I am running a MySQL subvolume backup, and must lock the database for run command duration.

Unfortunately, as database size increases, run is now taking 2 minutes and locked database is becoming increasingly uncomfortable to work with.

It'd be a lot smoother, if I could lock the database only for proposed new snapshot command (estimated to be significantly faster to unlock from), and transfer separately afterwards. Your thoughts?

masc3d commented 5 years ago

I understand your problem, but possible solutions don't integrate well into push / pull concept. eg possible solutions would be:

second solution would make most sense despite limitation.

have you tried dedicated btrfs volume for mysql db, manually snapshot with appropriate locking and backup using separate job for that volume?

lkraav commented 5 years ago

have you tried dedicated btrfs volume for mysql db,

I already made a dedicated btrfs db volume from the start, so this operation at least is async from the global fs backup jobs.

manually snapshot with appropriate locking, and backup using separate job for that volume?

I'm not sure I comprehend the details of how to set this up in a sane way. Initial question (if I'm even reading things right): are we talking some sort of snapshot duplication scenario then (my manual snapshots + btrfs-sxbackup-strategy snapshots), or? Having trouble visualizing the outcome.

masc3d commented 5 years ago

I'm not sure I comprehend the details of how to set this up in a sane way.

you're right. probably most sane way is to split run into snapshot for local operation and sync for transferring to remote.

masc3d commented 5 years ago

however, no time to implement this anytime soon.

did you try replicate for backup? https://dev.mysql.com/doc/refman/8.0/en/replication-solutions-backups.html