|
|
@ -111,7 +111,7 @@ for src in "${SOURCES[@]}"; do |
|
|
|
echo " " "lizardfs makesnapshot '${src}' '${DESTINATION}/${target}${date}'" |
|
|
|
echo " " "lizardfs makesnapshot '${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 " " "rm -rf '$f'" |
|
|
|
echo " " "lizardfs rremove '$f'" |
|
|
|
done |
|
|
|
done |
|
|
|
fi |
|
|
|
fi |
|
|
|
else |
|
|
|
else |
|
|
@ -119,7 +119,7 @@ for src in "${SOURCES[@]}"; do |
|
|
|
lizardfs makesnapshot "${src}" "${DESTINATION}/${target}${date}" |
|
|
|
lizardfs makesnapshot "${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 |
|
|
|
rm -rf "$f" |
|
|
|
lizardfs rremove "$f" |
|
|
|
done |
|
|
|
done |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|