annotate scripts/remote-backup.sh @ 342:27ae05ebfc1a production

Added tag v2.7.0 for changeset 9735d4fef9c5
author aldrich@ssdt-ohio.org
date Mon, 04 May 2020 19:13:14 +0100
parents 4285b8a2762e
children
rev   line source
287
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
1 #!/bin/bash
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
2 # Executes a database backup for the specified database container.
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
3 # The current directory is expected to contain a project configured
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
4 # as with SSDT conventions for an application database.
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
5 #
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
6 # When successful, the output file will be in ./backup with the
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
7 # container name and timestamp in the file.
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
8 # The file will also be placed on the specified remote target
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
9 # The format of the output is a compressed pg_dump (sql) format.
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
10 # along with the top level contents of the project directory
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
11 # Environment variables can be used for REMOTE_BACKUP_TARGET and REMOTE_USERNAME
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
12 #
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
13
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
14
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
15 container=${1?Must provide container name to backup}
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
16 remoteTarget=${2:-$REMOTE_BACKUP_TARGET}
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
17 userName=${3:-$REMOTE_USERNAME}
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
18 projectDir=${4:-$PWD}
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents:
diff changeset
19
4cc087cde1d0 backup script additions and changes
aldrich@nwoca.org
parents: