π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Allow restoring specific backups
Manav Rathi5c4c6f2677b3
diff --git a/infra/copycat-db/src/restore.sh b/infra/copycat-db/src/restore.shindex 8df19c62b2..6fa1a21a2f 100755--- a/infra/copycat-db/src/restore.sh+++ b/infra/copycat-db/src/restore.sh@@ -3,9 +3,16 @@set -o errexitset -o xtrace-# Find the name of the latest backup-# The backup file name contains the epoch, so we can just sort.-BACKUP_FILE=$(rclone lsf --include 'db-*.custom' --files-only $RCLONE_DESTINATION | sort | tail -1)+if test -z "$1"; then+ # Find the name of the latest backup.+ #+ # The backup file name contains the epoch, so we can just sort.+ BACKUP_FILE=$(rclone lsf --include 'db-*.custom' --files-only $RCLONE_DESTINATION | sort | tail -1)+else+ # If a CLI argument is provided, use that as the name of the backup file to+ # restore.+ BACKUP_FILE="$1"+fi# Download itrclone copy --log-level INFO "${RCLONE_DESTINATION}${BACKUP_FILE}" .