From 1fdec480d6e2d77749abd760dbc26a8c9096f710 Mon Sep 17 00:00:00 2001 From: "Jelle @ Samson-IT" <71821148+Jelle-SamsonIT@users.noreply.github.com> Date: Wed, 13 Jul 2022 13:29:45 +0200 Subject: [PATCH 1/2] Added some info about fetching mysql database size --- docs/how-to/inspect-your-backups.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/how-to/inspect-your-backups.md b/docs/how-to/inspect-your-backups.md index 318eb6ee..e4574d7d 100644 --- a/docs/how-to/inspect-your-backups.md +++ b/docs/how-to/inspect-your-backups.md @@ -75,6 +75,16 @@ example, to search only the last five archives: borgmatic list --find foo.txt --last 5 ``` +## Monitoring mysql backup size + +If you have enabled borgmatic's native mysql hook you can fetch the size of your individual sql backups from the backup target itself even when using an append-only access key like you can use on borgbase.com. + +For example: +```bash +borgmatic list --archive latest --no-color | grep root/.borgmatic/mysql_databases/localhost/ +``` + +Note that the `localhost` part of the path in this case is fully dependent on how your config looks. If you connect to an external database from this host, change to the address in config accordingly. ## Logging From 3720f222345fa6fbbf7f432c49f71d1bdae851e0 Mon Sep 17 00:00:00 2001 From: "Jelle @ Samson-IT" <71821148+Jelle-SamsonIT@users.noreply.github.com> Date: Wed, 13 Jul 2022 22:03:51 +0200 Subject: [PATCH 2/2] reworded and added 'all' caveat --- docs/how-to/inspect-your-backups.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/how-to/inspect-your-backups.md b/docs/how-to/inspect-your-backups.md index e4574d7d..1fa70317 100644 --- a/docs/how-to/inspect-your-backups.md +++ b/docs/how-to/inspect-your-backups.md @@ -77,14 +77,17 @@ borgmatic list --find foo.txt --last 5 ## Monitoring mysql backup size -If you have enabled borgmatic's native mysql hook you can fetch the size of your individual sql backups from the backup target itself even when using an append-only access key like you can use on borgbase.com. +If you have enabled borgmatic's native mysql hook you can query the size of your sql backups from the host you're backing up itself. This works even when using an append-only access key like you can use on borgbase.com. For example: ```bash borgmatic list --archive latest --no-color | grep root/.borgmatic/mysql_databases/localhost/ ``` -Note that the `localhost` part of the path in this case is fully dependent on how your config looks. If you connect to an external database from this host, change to the address in config accordingly. +Note that the `localhost` part of the path in the regex is dependent on how your config looks. If you connect to an external database your config, change to the regexp accordingly because the path will be different. + +An additional caveat is that when you specify "all" for your database config, there will be one file named "all.sql" in the localhost folder. +Specify your database names in config individually to have one file per database. ## Logging