Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lkraav opened this issue Jan 13, 2019 · 4 comments
Open

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

lkraav opened this issue Jan 13, 2019 · 4 comments

Comments

@lkraav
Copy link

lkraav commented Jan 13, 2019

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
Copy link
Owner

masc3d commented Jan 13, 2019

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

  • pre / post local snapshot scripts (post script may not execute if there's a connection problem leaving database locked forever)
  • split run operation into snapshot (local) and sync (transfer pending snapshots to remote, if possible incrementally) (doesn't support pull at all)

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
Copy link
Author

lkraav commented Jan 13, 2019

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
Copy link
Owner

masc3d commented Jan 13, 2019

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 masc3d changed the title New command snapshot, could run === snapshot + transfer? Individual commands for local (snapshot) and remote transfer (sync) Jan 13, 2019
@masc3d
Copy link
Owner

masc3d commented Jan 13, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants