From d41de30b5e1e71cdf27a8fe81ebd4e4393ee44ca Mon Sep 17 00:00:00 2001 From: Tom Keffer Date: Wed, 30 Sep 2015 08:09:26 -0700 Subject: [PATCH] Clarifed instructions on backing up weewx --- docs/usersguide.htm | 72 +++++++++++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 28 deletions(-) diff --git a/docs/usersguide.htm b/docs/usersguide.htm index bf3d0260..f84421ba 100644 --- a/docs/usersguide.htm +++ b/docs/usersguide.htm @@ -4047,18 +4047,20 @@ sudo /etc/init.d/apache2 restart

Making backups

- To backup a weewx installation, make a copy of - the weewx configuration, weather data, skins/templates, and custom code. - In most cases these can be copied while weewx is running. The location - of these files depends on which method was used to install - weewx. + To backup a weewx installation, you will need to make a copy + of

+ +

+ It is not necessary to backup the generated images, HTML files, or NOAA reports since weewx will easily + create these again.

-

- It is not necessary to backup the images and HTML files generated from - templates, since weewx will easily create those again. This includes - the NOAA reports in some skins. -

+

Individual instructions follow

Configuration

@@ -4075,24 +4077,7 @@ sudo /etc/init.d/apache2 restart /etc/weewx/weewx.conf -

Weather data

-

- Meteorological data are saved in the - archive database. For a SQLite - configuration, simply save the weewx.sdb - file. For a MySQL configuration, save a dump of the archive database. -

- - - - - - - - - -
setup.py:/home/weewx/archive/weewx.sdb
DEB/RPM:/var/lib/weewx/weewx.sdb

Skins and templates

@@ -4109,7 +4094,8 @@ sudo /etc/init.d/apache2 restart /etc/weewx/skins -

Other customizations

+ +

Custom code or extensions

Save the contents of the @@ -4128,6 +4114,36 @@ sudo /etc/init.d/apache2 restart +

Weewx database

+ +

+ Finally, you will need to backup the database. +

+

+ For a SQLite configuration, you will need to backup the weewx.sdb file. +

+

+ Do not make the copy of the SQLite database while in the middle of a + transaction! Schedule the + backup for immediately after an archive record is written, and then make sure + the backup completes before the next archive record arrives. + Alternatively, stop weewx, perform the backup, then restart weewx. +

+ + + + + + + + + + +
setup.py:/home/weewx/archive/weewx.sdb
DEB/RPM:/var/lib/weewx/weewx.sdb
+

+ For a MySQL configuration, save a dump of the archive database. +

+

Restoring from backup