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

feature request : add branched (tree like) increasmental backup abillty #151

Open
AnounIssues opened this issue Mar 23, 2023 · 3 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed research

Comments

@AnounIssues
Copy link

in vmware workstation we have tree like snapshot folder
if we suppose A is name of our common root snapshot in tree we can have:
B=A+changes; C=A+changes; B1=B+changes; C1=C+changes;..

but currently if you want to have such tree you have to copy and duplicate huge A volume for each branch (like creating new clone of volume and working on it)
and each clone adds 1X of size of root to the source (in destination --dedup makes it bearable and smaller) ( if we ignore the mass of having multi clones of vm (qube in qubes) which looks massy and ugly and a bit confusing)

if this is implemented this would be the best ever backup tool
hope you consider it

@tasket tasket added enhancement New feature or request help wanted Extra attention is needed research labels Mar 23, 2023
@tasket
Copy link
Owner

tasket commented Mar 23, 2023

I've considered adding a clone command so that a particular volume/session could be made into a separate volume. Preserving a tree-like relational structure would be another feature on top of that, and it could make pruning old snapshots somewhat complicated.

Of course, a more rudimentary form of cloning/branching can be achieved currently by cloning the local volume and then doing a send --dedup and using volume name variations or tags to track their lineage.

@tasket
Copy link
Owner

tasket commented Mar 23, 2023

Closely related to #64

@AnounIssues
Copy link
Author

I've considered adding a clone command so that a particular volume/session could be made into a separate volume. Preserving a tree-like relational structure would be another feature on top of that, and it could make pruning old snapshots somewhat complicated.

Of course, a more rudimentary form of cloning/branching can be achieved currently by cloning the local volume and then doing a send --dedup and using volume name variations or tags to track their lineage.

sorry for late replay . i was away
this my idea of how it can be implemnted considering the pruning :
for each session how flag a int BranchCount(number) which is the count of branches it has, for the last session it is 0 becuase no session follows it, for ordinary session in history (like the ones we have right now ) it is 1 , because only one snapshot is branched from it (depends on it) ( it does not matter how many newer sessions exists ,if the dependent session has it's own dependents it will be flagged as 1 too)

if a session braanches in to 2 lines, the flag will be 2, if branches to 3 lines the flag will be 3 ...
each snapshot will have the id(UUID or date like name we have now) so when restoring ,the app will know what history it has to follow up

if ever any volumne gets more than one branch we flag it with a BOOL HasBranches ,when using "send" for a " HasBranches=true" volume the user has to determine which branch(the session of last session in that branch ,or branches can have names (it's extra feature to tag branches ,we can avoid it for now ) it wants to send the changes .if not specified the app will send the changes to the last received (restored) branch/session and ask for confimation )

when puruning old session : the app will start from oldeest session and merge the changes , with each session it will check BranchCount (the int we store the count of branches in) ,if its more than one (BranchCount>1) we know we have branches and we can't continue pruning, stop there at notify the user ,becuase that's not technically possible , the session having more than one branch is needed (in vmware and virtual box you can't remove snapshots having more than one dependent too)
,the app will continue purning other snapshots after the 2branch session ,in branch chosen by the user or in all branches (we can promot and ask the user to either stop pruning ,continue on branch X ,continue in all Branches ) ;
this way we can only store session with BranchCount>1 and prune the others after and before it
p.s : we will need loops for pruning all branches ,it's an additional code cost,we can avoid implementing it in the first release

i dont know python and dont know to LVM snapshots work ,otherwise i would have helped in the coding

the describing of algo got long , the code of it guess can be written in a few hours , you already have done the most difficult part which is taking snapshots and having sessions and following them

thanks for reading my idea of how it can be implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed research
Projects
None yet
Development

No branches or pull requests

2 participants