Skip to content

Commit

Permalink
[B] Add safety check to restore script example
Browse files Browse the repository at this point in the history
  • Loading branch information
zdavis committed Nov 28, 2023
1 parent bb9b7d8 commit 9e07d69
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/administering/backup_restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ DB_NAME=manifold_production
BACKUP_FILES_ROOT=/var/opt/manifold/api
TOKEN=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)

if [ ! -f "$RESTORE_ARCHIVE_PATH" ]; then
echo "$RESTORE_ARCHIVE_PATH does not exist."
exit 1
fi

echo "Creating the restore staging directory at $RESTORE_DIR..."
su - manifold -c "mkdir -p $RESTORE_DIR"

Expand Down

0 comments on commit 9e07d69

Please sign in to comment.