From 1c67db5d627a9f936297747e3c410e868f625450 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Fri, 14 Apr 2023 16:40:58 -0700 Subject: [PATCH] Add documentation for "borgmatic restore --schema" (#375). --- NEWS | 3 ++- docs/how-to/backup-your-databases.md | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 9743d77..4a27d07 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ 1.7.13.dev0 * #375: Restore particular PostgreSQL schemas from a database dump via "borgmatic restore --schema" - flag. + flag. See the documentation for more information: + https://torsion.org/borgmatic/docs/how-to/backup-your-databases/#restore-particular-schemas 1.7.12 * #413: Add "log_file" context to command hooks so your scripts can consume the borgmatic log file. diff --git a/docs/how-to/backup-your-databases.md b/docs/how-to/backup-your-databases.md index 0b46e4c..91dba18 100644 --- a/docs/how-to/backup-your-databases.md +++ b/docs/how-to/backup-your-databases.md @@ -324,6 +324,17 @@ includes any combined dump file named "all" and any other individual database dumps found in the archive. +### Restore particular schemas + +New in version 1.7.13 With +PostgreSQL and MongoDB, you can limit the restore to a single schema found +within the database dump: + +```bash +borgmatic restore --archive latest --database users --schema tentant1 +``` + + ### Limitations There are a few important limitations with borgmatic's current database