Only restore files that don't exist
This commit is contained in:
+5
-1
@@ -2,5 +2,9 @@
|
||||
mc alias set storage "$STORAGE_URL" root "$MINIO_SECRET"
|
||||
|
||||
for f in $(mc ls --json storage/isos/cache | jq '.key' | tr -d '"'); do
|
||||
mc get -q "storage/isos/cache/$f" "./cache/$f"
|
||||
if [ ! -e "./cache/$f" ]; then
|
||||
mc get -q "storage/isos/cache/$f" "./cache/$f"
|
||||
else
|
||||
echo "Skipping already present: $f"
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user