anchor.diff:      end,
       BackupDir.
   
  -cluster_snap([], StartTime, _Dir) ->
  +cluster_snap([], StartTime, Dir) ->
       CheckInterval = ?CLUSTER_SNAP_CHECK_INTERVAL
       - if StartTime /= '$replace_with_timestamp' ->
  +             ZipFile = filename:join(filename:dirname(Dir), filename:basename(Dir)++".zip"),
  +             ZipCandidates = [begin
  +                                  {ok, Bin} = file:read_file(filename:join(Dir,F)),
  +                                  {F, Bin}
  +                              end || F <- filelib:wildcard("*.bkp", Dir)],
  +             ?Debug("zip:zip(~p, ~p)", [ZipFile, ZipCandidates]),
  +             case zip:zip(ZipFile, ZipCandidates) of
  +                 {error, Reason} ->
  +                     ?Error("cluster snapshot ~s failed reason : ~p", [ZipFile, Reason]);
  +                 _ ->
  +                     lists:foreach(
  +                       fun(F) -> ok = file:delete(filename:join(Dir,F)) end,
  +                       filelib:wildcard("*.*", Dir)),
  +                     ok = file:del_dir(Dir),
  +                     ?Info("cluster snapshot ~s", [ZipFile])
  +             end,
                PTime = timer:now_diff(os:timestamp(), StartTime) div 1000,
                ?Info("snapshot took ~pms", [PTime]),
                PTime;
            true -> 0
         end,
       ClusterSnapTables = ?GET_CLUSTER_SNAPSHOT_TABLES,
  -    ?Info("next snapshot of ~p after ~pms", [ClusterSnapTables, CheckInterval]),
  +    ?Info("next snapshot of ~p after ~pms",
  +          [ClusterSnapTables, CheckInterval]),
       erlang:send_after(
         CheckInterval, ?MODULE,
         {cluster_snap, ClusterSnapTables, os:timestamp(),
  -       create_clean_dir("backup_snapshot_")});
  -cluster_snap([T|Tabs], StartTime, Dir) ->
  +       '$create_when_needed'});
  +cluster_snap([T|Tabs], StartTime, MaybeDir) ->
  +    Dir = if MaybeDir == '$create_when_needed' ->
  +                 create_clean_dir("backup_snapshot_");
  +             true -> MaybeDir
  +          end,
       NextTabs = case catch take_chunked(T, Dir) of                   
                      ok ->
                          ?Info("snapshot ~p", [T]),
  
positive.code:                        ?Error("cluster_snap failed for ~p : ~p", [T, Error]),
                         Tabs++[T]
                 end,
      erlang:send_after(1000, ?MODULE, {cluster_snap, NextTabs, StartTime, Dir}).
  
  handle_info({cluster_snap, Tables, StartTime, Dir}, State) ->
      case ?GET_CLUSTER_SNAPSHOT of
  
negative.code:             ClusterSnapHour = ?GET_CLUSTER_SNAPSHOT_TOD,
              case calendar:now_to_local_time(os:timestamp()) of
                  {{_,_,_},{ClusterSnapHour,_,_}} ->
                      if Dir == '$create_when_needed' ->
                             ?Info("starting ~p cluster snapshot", [Tables]);
                         true -> ok
                      end,
                      spawn(fun() -> cluster_snap(Tables, StartTime, Dir) end);
                  _ -> nop
              end;
  