davinci-resolve-postgresql-workflow-tools icon indicating copy to clipboard operation
davinci-resolve-postgresql-workflow-tools copied to clipboard

Fallback destination directory

Open sethgoldin opened this issue 2 years ago • 0 comments

From @macvfx, a suggestion to check to make sure the folder exists:

#!/bin/bash

# The backup file path to check
file_path="/path/to/folder"

# Check if the file path exists and if we have write permissions on it
if [ -d "$file_path" ] && [ -w "$file_path" ]; then
  echo "The file path exists and we have write permissions on it. Do the regular backup step here"
else
  echo "The file path either does not exist or we do not have write permissions on it. Do the fail safe backup"
fi

sethgoldin avatar Feb 10 '23 16:02 sethgoldin