So it will not restart, I copied back the backup database. I tried with and
without the sql drop, now the database will not start... :(

pi@raspberrypi:~ $ sudo cp -p /var/tmp/weewx.sdb.backup
/var/lib/weewx/weewx.sdb

pi@raspberrypi:~ $ sudo sqlite3 /var/lib/weewx/weewx.sdb
SQLite version 3.8.7.1 2014-10-29 13:59:56
Enter ".help" for usage hints.
sqlite>
sqlite> DELETE FROM archive WHERE dateTime > 1514181600;
sqlite> .quit

pi@raspberrypi:~ $ sudo wee_database --drop-daily
Using configuration file /etc/weewx/weewx.conf
Using database binding 'wx_binding', which is bound to database
'archive_sqlite'
Proceeding will delete all your daily summaries from database 'weewx.sdb'
Are you sure you want to proceed (y/n)? y
Dropping daily summary tables from 'weewx.sdb' ...
Daily summary tables dropped from database 'weewx.sdb' in 2.58 seconds

pi@raspberrypi:~ $ sudo wee_database --rebuild-daily
Using configuration file /etc/weewx/weewx.conf
Using database binding 'wx_binding', which is bound to database
'archive_sqlite'
All daily summaries will be rebuilt.
Proceed (y/n)? y
Rebuilding daily summaries in database 'weewx.sdb' ...
Records processed: 738000; Last date: 2017-12-21 11:30:00 CST (1513877400)
Processed 738994 records to rebuild 2585 day summaries in 698.76
seconds
Rebuild of daily summaries in database 'weewx.sdb' complete

pi@raspberrypi:~ $ sudo systemctl start weewx;tail -f /var/log/messages
Dec 26 21:04:06 raspberrypi wee_database[18640]: manager: Processed 738994
records to backfill 2585 day summaries in 698.48 seconds
Dec 26 21:04:06 raspberrypi wee_database[18640]: Rebuild of daily summaries
in database 'weewx.sdb' complete
Dec 26 21:13:36 raspberrypi wee_database[18824]: manager: Dropping daily
summary tables from 'weewx.sdb' ...
Dec 26 21:13:38 raspberrypi wee_database[18824]: manager: Dropped daily
summary tables from database 'weewx.sdb'
Dec 26 21:13:45 raspberrypi wee_database[18832]: All daily summaries will
be rebuilt.
Dec 26 21:13:47 raspberrypi wee_database[18832]: manager: Created daily
summary tables
Dec 26 21:13:47 raspberrypi wee_database[18832]: Rebuilding daily summaries
in database 'weewx.sdb' ...
Dec 26 21:13:47 raspberrypi wee_database[18832]: manager: Starting backfill
of daily summaries
Dec 26 21:25:21 raspberrypi wee_database[18832]: manager: Processed 739683
records to backfill 2588 day summaries in 694.00 seconds
Dec 26 21:25:22 raspberrypi wee_database[18832]: Rebuild of daily summaries
in database 'weewx.sdb' complete
^C
pi@raspberrypi:~ $ ps -ef | grep weewx
pi       18967  1332  0 21:26 pts/0    00:00:00 grep --color=auto weewx
pi@raspberrypi:~ $


pi@raspberrypi:~ $ sudo systemctl -l status weewx
● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx)
   Active: active (exited) since Tue 2017-12-26 09:11:01 CST; 11h ago
  Process: 12968 ExecStop=/etc/init.d/weewx stop (code=exited,
status=0/SUCCESS)
  Process: 13199 ExecStart=/etc/init.d/weewx start (code=exited,
status=0/SUCCESS)

Dec 26 09:11:02 raspberrypi weewx[13213]: ****    File
"/usr/share/weewx/weewx/engine.py", line 604, in setup_database
Dec 26 09:11:02 raspberrypi weewx[13213]: ****      _nrecs, _ndays =
dbmanager.backfill_day_summary() # @UnusedVariable
Dec 26 09:11:02 raspberrypi weewx[13213]: ****    File
"/usr/share/weewx/weewx/manager.py", line 1428, in backfill_day_summary
Dec 26 09:11:02 raspberrypi weewx[13213]: ****
timestamp_to_string(lastRecord)))
Dec 26 09:11:02 raspberrypi weewx[13213]: ****  ViolatedPrecondition:
lastUpdate(2017-12-26 08:55:00 CST (1514300100)) > lastRecord(2017-12-25
00:00:00 CST (1514181600))
Dec 26 09:11:02 raspberrypi weewx[13213]: ****  Exiting.
Dec 26 20:44:30 raspberrypi systemd[1]: Started LSB: weewx weather system.
Dec 26 20:45:47 raspberrypi systemd[1]: Started LSB: weewx weather system.
Dec 26 20:47:02 raspberrypi systemd[1]: Started LSB: weewx weather system.
Dec 26 21:05:26 raspberrypi systemd[1]: Started LSB: weewx weather system.
pi@raspberrypi:~ $



On Tue, Dec 26, 2017 at 1:49 PM, gjr80 <[email protected]> wrote:

> Hi,
>
> Try dropping the daily summaries before rebuilding:
>
> sudo wee_database --drop-daily
> sudo wee_database --rebuild-daily
>
> Since 3.7.0 (I think) you can usually, but not always, rebuild without
> first dropping. I think this is one of those exceptions.
>
> Gary
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/weewx-user/RezDiRbbCks/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to