Browse Source

Add SQLite feature to NEWS and also integrations.

Dan Helfman 2 years ago
parent
commit
e1f02d9fa5
6 changed files with 13 additions and 9 deletions
  1. 3 0
      NEWS
  2. 1 0
      README.md
  3. 1 1
      borgmatic/hooks/sqlite.py
  4. 7 7
      docs/how-to/backup-your-databases.md
  5. BIN
      docs/static/sqlite.png
  6. 1 1
      setup.py

+ 3 - 0
NEWS

@@ -1,3 +1,6 @@
+1.7.9.dev0
+ * #295: Add a SQLite database dump/restore hook.
+
 1.7.8
 1.7.8
  * #620: With the "create" action and the "--list" ("--files") flag, only show excluded files at
  * #620: With the "create" action and the "--list" ("--files") flag, only show excluded files at
    verbosity 2.
    verbosity 2.

+ 1 - 0
README.md

@@ -67,6 +67,7 @@ borgmatic is powered by [Borg Backup](https://www.borgbackup.org/).
 <a href="https://www.mysql.com/"><img src="docs/static/mysql.png" alt="MySQL" height="60px" style="margin-bottom:20px;"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <a href="https://www.mysql.com/"><img src="docs/static/mysql.png" alt="MySQL" height="60px" style="margin-bottom:20px;"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <a href="https://mariadb.com/"><img src="docs/static/mariadb.png" alt="MariaDB" height="60px" style="margin-bottom:20px;"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <a href="https://mariadb.com/"><img src="docs/static/mariadb.png" alt="MariaDB" height="60px" style="margin-bottom:20px;"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <a href="https://www.mongodb.com/"><img src="docs/static/mongodb.png" alt="MongoDB" height="60px" style="margin-bottom:20px;"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <a href="https://www.mongodb.com/"><img src="docs/static/mongodb.png" alt="MongoDB" height="60px" style="margin-bottom:20px;"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+<a href="https://sqlite.org/"><img src="docs/static/sqlite.png" alt="SQLite" height="60px" style="margin-bottom:20px;"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <a href="https://healthchecks.io/"><img src="docs/static/healthchecks.png" alt="Healthchecks" height="60px" style="margin-bottom:20px;"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <a href="https://healthchecks.io/"><img src="docs/static/healthchecks.png" alt="Healthchecks" height="60px" style="margin-bottom:20px;"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <a href="https://cronitor.io/"><img src="docs/static/cronitor.png" alt="Cronitor" height="60px" style="margin-bottom:20px;"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <a href="https://cronitor.io/"><img src="docs/static/cronitor.png" alt="Cronitor" height="60px" style="margin-bottom:20px;"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <a href="https://cronhub.io/"><img src="docs/static/cronhub.png" alt="Cronhub" height="60px" style="margin-bottom:20px;"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <a href="https://cronhub.io/"><img src="docs/static/cronhub.png" alt="Cronhub" height="60px" style="margin-bottom:20px;"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

+ 1 - 1
borgmatic/hooks/sqlite.py

@@ -106,7 +106,7 @@ def restore_database_dump(database_config, log_prefix, location_config, dry_run,
 
 
     try:
     try:
         os.remove(database_path)
         os.remove(database_path)
-        logger.warn(f'{log_prefix}: Removed existing SQLite database at {database_path}')
+        logger.warning(f'{log_prefix}: Removed existing SQLite database at {database_path}')
     except FileNotFoundError:  # pragma: no cover
     except FileNotFoundError:  # pragma: no cover
         pass
         pass
 
 

+ 7 - 7
docs/how-to/backup-your-databases.md

@@ -16,7 +16,7 @@ consistent snapshot that is more suited for backups.
 Fortunately, borgmatic includes built-in support for creating database dumps
 Fortunately, borgmatic includes built-in support for creating database dumps
 prior to running backups. For example, here is everything you need to dump and
 prior to running backups. For example, here is everything you need to dump and
 backup a couple of local PostgreSQL databases, a MySQL/MariaDB database, a
 backup a couple of local PostgreSQL databases, a MySQL/MariaDB database, a
-MongoDB database and a SQLite database:
+MongoDB database, and a SQLite database:
 
 
 ```yaml
 ```yaml
 hooks:
 hooks:
@@ -29,7 +29,7 @@ hooks:
         - name: messages
         - name: messages
     sqlite_databases:
     sqlite_databases:
         - name: mydb
         - name: mydb
-          path: /var/lib/sqlite3/mydb.sqlite          
+          path: /var/lib/sqlite3/mydb.sqlite
 ```
 ```
 
 
 As part of each backup, borgmatic streams a database dump for each configured
 As part of each backup, borgmatic streams a database dump for each configured
@@ -160,11 +160,11 @@ bring back any missing configuration files in order to restore a database.
 
 
 ## Supported databases
 ## Supported databases
 
 
-As of now, borgmatic supports PostgreSQL, MySQL/MariaDB, MongoDB and SQLite databases
-directly. But see below about general-purpose preparation and cleanup hooks as
-a work-around with other database systems. Also, please [file a
-ticket](https://torsion.org/borgmatic/#issues) for additional database systems
-that you'd like supported.
+As of now, borgmatic supports PostgreSQL, MySQL/MariaDB, MongoDB, and SQLite
+databases directly. But see below about general-purpose preparation and
+cleanup hooks as a work-around with other database systems. Also, please [file
+a ticket](https://torsion.org/borgmatic/#issues) for additional database
+systems that you'd like supported.
 
 
 
 
 ## Database restoration
 ## Database restoration

BIN
docs/static/sqlite.png


+ 1 - 1
setup.py

@@ -1,6 +1,6 @@
 from setuptools import find_packages, setup
 from setuptools import find_packages, setup
 
 
-VERSION = '1.7.8'
+VERSION = '1.7.9.dev0'
 
 
 
 
 setup(
 setup(