mirror of
https://github.com/restic/restic.git
synced 2026-10-29 11:35:42 +00:00
Store maps in new subdir "maps"
This commit is contained in:
1 parent
b1923063fe
commit
33ce4e33aa
9 files changed
+57
-12
No files matched your search
+8
-3
@@ -85,7 +85,7 @@ func NewArchiver(be backend.Server, key *Key) (*Archiver, error) {
|
||||
}
|
||||
|
||||
// load all blobs from all snapshots
|
||||
err = arch.ch.LoadAllSnapshots()
|
||||
err = arch.ch.LoadAllMaps()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -371,11 +371,16 @@ func (arch *Archiver) Snapshot(dir string, t *Tree) (*Snapshot, backend.ID, erro
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
sn.Content = blob.ID
|
||||
|
||||
// save bloblist
|
||||
blob, err = arch.SaveJSON(backend.Map, arch.bl)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
sn.Map = blob.Storage
|
||||
|
||||
// save snapshot
|
||||
sn.BlobList = arch.bl
|
||||
blob, err = arch.SaveJSON(backend.Snapshot, sn)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
|
||||
Reference in new issue
Block a user