rtb-wrapper icon indicating copy to clipboard operation
rtb-wrapper copied to clipboard

Feature Request: pre-run/post-run options

Open githubjsorg opened this issue 4 years ago • 3 comments

Hi. I haven't used this or the related rsync-time-backup tools yet but am planning on doing so.

A feature that would be extremely useful in this wrapper is pre/post-backup/restore commands similar to pre/post-up/down options in debian /etc/network/interfaces config.

Ex. PRE_BACKUP=SOME COMMAND POST_BACKUP=SOME OTHER COMMAND

Example Use Case: Make sure a Databases files are synced to disk before backup. Either by shutting the DB down PRE_RUN and starting it back up POST_RUN. Or using lock/unlock commands pre/post run, etc. Or alternatively do a dump so that also gets backed up.

githubjsorg avatar Oct 29 '19 23:10 githubjsorg

Thank's for reporting, @githubjsorg!

Actually I like the idea. But there are two things in my mind about that.

  1. I tend to remove the config.inc file and only invoke rsync and rsync_tmbackup.sh, trusting they are both in the $PATH. If not there will be an env variable to override their paths. Thus, this tool would remove support of tooling integration and let this leave to the user. Finally, it'd be required to wrap the invocation if special needs are required (like adjusting the process priority or invoke pre/post commands).
  2. I'm already working on a successor to this tool which already has support for this.

But I'll think about it anyway and maybe just integrate it.

thomas-mc-work avatar Nov 08 '19 13:11 thomas-mc-work

"I'm already working on a successor to this tool which already has support for this."

Nice. What is the name of this and do you have an ETA for it?

As for the pre/post run stuff, for my current project, I have been just wrapping rsync_tmbackup in another SSH script for each backup job. Not as elegant but does the job.

githubjsorg avatar Nov 08 '19 17:11 githubjsorg

There is no name nor ETA yet. But I'll announce any news on that project in this repo.

thomas-mc-work avatar Nov 12 '19 15:11 thomas-mc-work