wait for snapshot

This commit is contained in:
Marc Wäckerlin
2018-09-26 11:43:50 +02:00
parent 42f160dd51
commit ae2bb5ba04
2 changed files with 4 additions and 4 deletions

View File

@@ -1,8 +1,8 @@
Backup And Snapshot Scripts Backup And Snapshot Scripts
=========================== ===========================
- [BTRFS](btrfs) - [btrfs](btrfs)
- [LizardFs](lizardfs) - [lizardfs](lizardfs)
Installation Installation
------------ ------------

View File

@@ -108,7 +108,7 @@ for src in "${SOURCES[@]}"; do
target="${src##*/}${periodity}" target="${src##*/}${periodity}"
if test $dryrun -eq 1; then if test $dryrun -eq 1; then
echo -e "→ \e[1mbackup $src\e[0m" echo -e "→ \e[1mbackup $src\e[0m"
echo " " "lizardfs makesnapshot '${src}' '${DESTINATION}/${target}${date}'" echo " " "lizardfs makesnapshot -lf '${src}' '${DESTINATION}/${target}${date}'"
if test -n "$del"; then if test -n "$del"; then
for f in $(ls -d1 "${DESTINATION}/${target}"-* | sort -r | tail -n +"$del"); do for f in $(ls -d1 "${DESTINATION}/${target}"-* | sort -r | tail -n +"$del"); do
echo " " "lizardfs rremove '$f'" echo " " "lizardfs rremove '$f'"
@@ -116,7 +116,7 @@ for src in "${SOURCES[@]}"; do
fi fi
else else
echo -e "→ \e[1mbackup $src\e[0m" echo -e "→ \e[1mbackup $src\e[0m"
lizardfs makesnapshot "${src}" "${DESTINATION}/${target}${date}" lizardfs makesnapshot -lf "${src}" "${DESTINATION}/${target}${date}"
if test -n "$del"; then if test -n "$del"; then
for f in $(ls -d1 "${DESTINATION}/${target}"-* | sort -r | tail -n +"$del"); do for f in $(ls -d1 "${DESTINATION}/${target}"-* | sort -r | tail -n +"$del"); do
lizardfs rremove "$f" lizardfs rremove "$f"