rremove must have option -l to complete

This commit is contained in:
Marc Wäckerlin
2018-11-07 11:48:49 +01:00
parent 7e727c7672
commit ce401ce289
2 changed files with 4 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ older snapshots are deleted.
To create regular snapshots on a daily base, just run: To create regular snapshots on a daily base, just run:
sudo cp btrfs-snapshots.sh /etc/cron.daily/btrfs-snapshots sudo cp lizardfs-snapshots.sh /etc/cron.daily/lizardfs-snapshots
If `lizardfs-snapshots` is run from a `cron.daily`, `cron.hourly`, If `lizardfs-snapshots` is run from a `cron.daily`, `cron.hourly`,
`cron. monthly` or `cron.weekly` directory, the periodity is `cron. monthly` or `cron.weekly` directory, the periodity is

View File

@@ -111,7 +111,7 @@ for src in "${SOURCES[@]}"; do
echo " " "lizardfs makesnapshot -lf '${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 -l '$f'"
done done
fi fi
else else
@@ -119,7 +119,7 @@ for src in "${SOURCES[@]}"; do
lizardfs makesnapshot -lf "${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 -l "$f"
done done
fi fi
fi fi