-
Notifications
You must be signed in to change notification settings - Fork 3
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
Save and Restore config back-up files #42
Comments
That's an interesting idea. I am operating under the assumption that your suggestion is around the thought of stability, meaning, no changes to the config backup functionality while still enabling a non-destructive update? |
@Hooverdan96 Re:
Yes me and @FroggyFlox did entertain this idea actually, but I'm unsure if we have a requirement, or will incure more complexity, if we move outside of static for the working directory, given it's what the Django stuff can normally reach. Hence this as a quick fix that also adds redundancy. And only entails rpm scriptlet changes so we can likely get this in place for the next release. Then in the future, when we have more of our updates in place, we can re-visit and enhance further re custom settings and non build-time but run-time directory setting. I think we are of similar minds on this one all around really. I just wanted to get in the simplest 'fix' for now and as you say it may server as a transition for the future. But changing this will entail no core changes and no db migration issues etc.
Exactly - it's not good what we have, and a couple of lines in outgoing and incoming rpm scriptlets and we have a fix as we wrestle our dependencies etc. Then we get our selves some time/distance to fathom our 'other' options and enhancements. Sort of a bit-by-bit with minimal fix at first. Just not entirely sure of our options re access outside of the static. But we know it works there and we have had years of using the current location. Only my new Poetry based install method took a brute force approach to re-establishing static - which I stand by - but I entirely missed this ramification. So it's great that it's come to light. Hence quick fix with minimal intervention all around. At least initially. Also I like the idea of taking copies on each package operation so it might be good to keep that facility, if that is the way we end up going. Incidentally there has been side chat on providing an easy Appman config backup upload/stash capability - but again - for another time, issue, and repo I think :). |
yep, we're aligned. Go for it. One more question:
Well, you must have something in mind, I can just look at your pull request, once you get to it. |
@Hooverdan96 I'll present what I think may fix our current failure and we can review from there. Likely there will be holes but hopefully smaller than we obviously have currently :). But give this mechanism will live entirely in rpm scriptlets it want's to be as basic as possible was my thinking. |
To account for upgrades from our current Stable release, assuming no backports, to the stable that will ultimately be spun off form our current testing branch, we need the majority, if not all, of the fix here to be in scriptlets of the incoming package. |
1. Copy static/config-backups/* to config-backups-rpmsave: incoming package %pre scriptlet (first to run). 2. Copy config-backups-rpmsave/* to static/config-backups: incoming package %posttrans (last to run and after build.sh). It is important that we restore our config backup files after build.sh as it depends on a non-existent static directory to establish incoming static contents: see %post, in update mode, which ensures the removal of the static directory.
…-up-files Save and Restore config back-up files #42
Closing as: |
As a partial solution to rockstor/rockstor-core#2639 we could/should:
outgoingpackage scriptlet (removed or upgraded) copy it's ´/opt/rockstor/static/config-backups´ contents to top-level ´/opt/rockstor/config-backups´ directory.A bonus of this process is that on every package managed upgrade we make a copy of our config backup files.
This proposed ´/opt/rockstor/config-backups´ directory would not be deleted in any package clean-up process. And so would serve as a repository for such files, while still maintaining our isolation form the OS at large and keeping within our parent directory.
The text was updated successfully, but these errors were encountered: