Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docker/openemr/flex/utilities/devtoolsLibrary.source
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ backupOpenemr() {

# parameter 1 is identifier
restoreOpenemr() (
cd /snapshots || exit
tar -C /snapshots -xzf "${1}.tgz"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what -C is supposed to do. What did I miss?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saw your comment in the ticket. I thought there was a reason why doing cd for the entirety of the subshell was not desirable, but I can't recall now. Anyway, let's try it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea I wondered why the cd was removed and thought there had to be a reason. The -C only works for the export of tar from what the man page and my testing showed. The file input argument ignores the -C which is annoying.

# need to empty the database before the restore database import
mariadb-dump --skip-ssl -u "${CUSTOM_ROOT_USER}" --password="${MYSQL_ROOT_PASS}" -h "${MYSQL_HOST}" -P "${CUSTOM_PORT}" --add-drop-table --no-data "${CUSTOM_DATABASE}" |
Expand Down
Loading