Skip to content

Add script to perform database backups - #46

Merged
steventux merged 3 commits into
mainfrom
feat/database-backups
Mar 16, 2026
Merged

Add script to perform database backups#46
steventux merged 3 commits into
mainfrom
feat/database-backups

Conversation

@steventux

@steventux steventux commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Description

Add a script and make command to perform database backups.
Uses sqlite3 conn.backup() function which can run on an in-use database.
Uses .env file to detect db file paths.

image

Jira link

https://nhsd-jira.digital.nhs.uk/browse/DTOSS-12395

Review notes

This PR doesn't handle the scheduling of db backups. TBD

Review checklist

  • Check database queries are correctly scoped to current_provider


print("Starting database backup...")
print("PACS_DB_PATH:", pacs_db_path, "MWL_DB_PATH:", mwl_db_path)
success = True

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this should be the start and end of all computer programs

@carlosmartinez carlosmartinez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@steventux
steventux merged commit a748deb into main Mar 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants