Only restore files that don't exist

This commit is contained in:
Greg Hellings
2024-06-28 09:54:17 -05:00
parent 1629effd51
commit e6804fefc3
+5 -1
View File
@@ -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