diff options
author | n-peugnet <n.peugnet@free.fr> | 2021-10-15 15:11:35 +0200 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2021-10-15 15:11:43 +0200 |
commit | 83ced1ad92f591814c675ddca51bfb720b4b3d7b (patch) | |
tree | 1c48a82a1136088bf677fc8f060402ba6cb545c8 /exp/Makefile | |
parent | 3ffafd6499f50ea71d1ad1a7ac554f4c4448ed6c (diff) | |
download | dna-backup-83ced1ad92f591814c675ddca51bfb720b4b3d7b.tar.gz dna-backup-83ced1ad92f591814c675ddca51bfb720b4b3d7b.zip |
add borg backup to experiment
Diffstat (limited to 'exp/Makefile')
-rw-r--r-- | exp/Makefile | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/exp/Makefile b/exp/Makefile index 81a9464..5437785 100644 --- a/exp/Makefile +++ b/exp/Makefile @@ -38,6 +38,7 @@ DNA_4K ?= dna_4k DNA_8K ?= dna_8k NOPACK ?= nopack export GIT_NOPACK ?= $(abspath $(NOPACK)) +export BORG ?= borg export TARGZ ?= targz export REAL ?= real export DIFFS ?= diffs @@ -47,7 +48,7 @@ export GIT_PATH ?= $(abspath git) GITC := git -C $(REPO_PATH) DNADIRS := $(DNA_4K) $(DNA_8K) -DATADIRS := $(DNA_4K) $(DNA_8K) $(DIFFS) $(NOPACK) $(TARGZ) $(REAL) +DATADIRS := $(DNA_4K) $(DNA_8K) $(DIFFS) $(NOPACK) $(BORG) $(TARGZ) $(REAL) SIZEFILES := $(DATADIRS:%=%.size) .PHONY: all exp @@ -75,6 +76,15 @@ $(DNADIRS:%=%.size) $(REAL).size: %.size: %.versions run cut -f1 $$i | paste -sd+ | bc >> $@; \ done +$(BORG).size: $(BORG).versions run + rm -rf $@ + prev=0; for i in $</*; do \ + last=`cut -f1 $$i`; \ + let curr=$$last-$$prev; \ + echo $$curr >> $@; \ + prev=$$last; \ + done + $(NOPACK).size: $(NOPACK).versions run rm -rf $@ prev=/dev/null; for i in $</*; do \ @@ -105,7 +115,7 @@ $(NOPACK).size: $(NOPACK).versions run | sort -k2 \ > $@ -run: $(COMMITS) $(DNA_BACKUP) $(DNA_PARAMS) | printvars $(DATADIRS) $(NOPACK).versions $(REAL).versions +run: $(COMMITS) $(DNA_BACKUP) $(DNA_PARAMS) | printvars $(DATADIRS) $(NOPACK).versions $(BORG).versions $(REAL).versions rm -rf $(DATADIRS:%=%/*) $(DATADIRS:%=%.versions/*) ./exp.sh touch $@ @@ -120,7 +130,7 @@ $(DNA_PARAMS): echo "$(DNA_4K) -c 4096" >> $@ echo "$(DNA_8K) -c 8192" >> $@ -$(DATADIRS) $(NOPACK).versions $(REAL).versions: +$(DATADIRS) $(NOPACK).versions $(BORG).versions $(REAL).versions: mkdir $@ $(DNA_BACKUP): .FORCE |