Skip to content

Commit 12821ca

Browse files
Docs: How to restore backup #190
1 parent d4c816d commit 12821ca

File tree

7 files changed

+304
-241
lines changed

7 files changed

+304
-241
lines changed

docs/changelog.rst

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ v1.6.0 - 2017-xx-xx
2525

2626
- Automatic refresh of dashboard charts (`#210 <https://github.com/dennissiemensma/dsmr-reader/issues/210>`_).
2727
- Extend API docs with additional example (`#185 <https://github.com/dennissiemensma/dsmr-reader/issues/185>`_).
28+
- Docs: How to restore backup (`#190 <https://github.com/dennissiemensma/dsmr-reader/issues/190>`_).
2829

2930

3031

docs/installation.rst

+24
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,18 @@ Does Postgres not start due to locales? Try: ``dpkg-reconfigure locales``. Stil
8787

8888
sudo sudo -u postgres psql -c "alter user dsmrreader with password 'dsmrreader';"
8989

90+
.. note::
91+
92+
**Optional**: Do you need to restore a **PostgreSQL** database backup as well?
93+
94+
Restore an uncompressed (``.sql``) backup with::
95+
96+
sudo sudo -u postgres psql dsmrreader -f <PATH-TO-POSTGRESQL-BACKUP.sql>
97+
98+
Or restore a compressed (``.gz``) backup with::
99+
100+
zcat <PATH-TO-POSTGRESQL-BACKUP.sql.gz> | sudo sudo -u postgres psql dsmrreader
101+
90102

91103
(Option B.) MySQL/MariaDB
92104
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -112,6 +124,18 @@ Install MariaDB. You can also choose to install the closed source MySQL, as they
112124

113125
sudo mysqladmin reload --defaults-file=/etc/mysql/debian.cnf
114126

127+
.. note::
128+
129+
**Optional**: Do you need to restore a **MySQL** database backup as well?
130+
131+
Restore an uncompressed (``.sql``) backup with::
132+
133+
cat <PATH-TO-MYSQL-BACKUP.sql.gz> | sudo mysql -D dsmrreader --defaults-file=/etc/mysql/debian.cnf
134+
135+
Or restore a compressed (``.gz``) backup with::
136+
137+
zcat <PATH-TO-MYSQL-BACKUP.sql.gz> | sudo mysql -D dsmrreader --defaults-file=/etc/mysql/debian.cnf
138+
115139

116140
2. Dependencies
117141
---------------
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)