Closed DylanYoung closed 4 years ago
@sehmaschine Is this something that makes sense to you? Or is there some other mechanism to do the same that I'm missing...
If not, I can work on a PR.
I'm not sure I fully get the proposal/issue. Why can't you use FILEBROWSER_VERSIONS
instead of a manifest file? Can you please explain the use case (backup/'recovery) in more detail?
FILEBROWSER_VERSIONS doesn't tell me what versions have been generated, just which versions are available to generate.
So if I have one version file and my system bricks without having the versions backed up (which is unnecessary, though at this point, the simplest most robust solution), the only way to recover is by generating all versions for all files. Crazy sauce. An alternative is to search the database for all fields that might contain a version file, also crazy sauce.
On Fri., Oct. 18, 2019, 2:21 p.m. Patrick Kranzlmueller, < notifications@github.com> wrote:
I'm not sure I fully get the proposal/issue. Why can't you use FILEBROWSER_VERSIONS instead of a manifest file? Can you please explain the use case (backup/'recovery) in more detail?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sehmaschine/django-filebrowser/issues/375?email_source=notifications&email_token=ABMG3FDVSOOZOM3Z3JZE5TTQPHWBLA5CNFSM4JB2JTWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBVG4RY#issuecomment-543845959, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMG3FFS6MARMGONPNB6CS3QPHWBLANCNFSM4JB2JTWA .
I'm open to other proposals though. Using the database to store a list of generated versions might be easier.
On Fri., Oct. 18, 2019, 4:52 p.m. Dylan Young, dylanyoungmeijer@gmail.com wrote:
FILEBROWSER_VERSIONS doesn't tell me what versions have been generated, just which versions are available to generate.
So if I have one version file and my system bricks without having the versions backed up (which is unnecessary, though at this point, the simplest most robust solution), the only way to recover is by generating all versions for all files. Crazy sauce. An alternative is to search the database for all fields that might contain a version file, also crazy sauce.
On Fri., Oct. 18, 2019, 2:21 p.m. Patrick Kranzlmueller, < notifications@github.com> wrote:
I'm not sure I fully get the proposal/issue. Why can't you use FILEBROWSER_VERSIONS instead of a manifest file? Can you please explain the use case (backup/'recovery) in more detail?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sehmaschine/django-filebrowser/issues/375?email_source=notifications&email_token=ABMG3FDVSOOZOM3Z3JZE5TTQPHWBLA5CNFSM4JB2JTWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBVG4RY#issuecomment-543845959, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMG3FFS6MARMGONPNB6CS3QPHWBLANCNFSM4JB2JTWA .
@DylanYoung I see what you mean, but this might be overkill IMO. my approach on versions is that they can easily be thrown away and shouldn't be part of a backup. if you need to re-create the versions, you can easily do that ... or even better, don't care about it since versions should be created once they are retrieved.
do I miss something here?
I'm closing this (for now) since the idea of versions is to generate them on the fly, not caring about which versions have already been created.
The management command
fb_version_generate
should be able to generate versions based on a manifest of existing versions.This is for backup and recovery purposes.
Some additional tooling is probably necessary:
fb_generate_manifest
command to generate a manifest based on the current_versions
directory.Some niceties that could be future enhancements: