Garbage collect backups

If ther are backups made to the same folder, need to remove any files from that folder that are not included in this backup.

Some initial testing, needs more.
This commit is contained in:
Martin Sumner 2018-09-07 14:21:01 +01:00
parent b99cde9599
commit 91f751ddc6
3 changed files with 41 additions and 11 deletions

View file

@ -1169,7 +1169,9 @@ handle_call(hot_backup, _From, State) when State#state.head_only == false ->
end
end,
InkerOpts =
#inker_options{start_snapshot=true, source_inker=State#state.inker},
#inker_options{start_snapshot = true,
source_inker = State#state.inker,
bookies_pid = self()},
{ok, Snapshot} = leveled_inker:ink_snapstart(InkerOpts),
{reply, {async, BackupFun(Snapshot)}, State};
handle_call(close, _From, State) ->