##############################################################################

# This section is for general configuration information

# Root directory of the weewx data file hierarchy for this station.
WEEWX_ROOT = /

# Set to 1 for extra debug info, otherwise comment it out or set to zero.
debug = 0

# How long to wait before timing out a socket (FTP, HTTP) connection:
socket_timeout = 20

##############################################################################

[DataBindings]
    
    [[wx_binding]]
    # This section should be the same as the wx_binding in weewx.conf,
    # with the exception that the database user (defined in the [database] section) can
    # be limited to read-only privileges on the weewx database.
    # Alternatively, if the weewx config file is used as the source config for the backup
    # script, the correct database will be picked up automatically.
        # The database must match one of the sections in [Databases] 
        database = archive_mysql
        # The name of the table within the database
        table_name = archive
        # The manager handles aggregation of data for historical summaries
        manager = weewx.wxmanager.WXDaySummaryManager
        # The schema defines the structure of the database.
        # It is *only* used when the database is created.
        schema = schemas.wview.schema

    [[backup_binding]]
    # This section defines the data store that will be written -- the destination for the backup.
    # It can be a local SQLite database, or a local or remote mysql instance.
        # The database must match one of the sections in [Databases] 
        database = replicate_sqlite
        # The name of the table within the database.  This can be the same or different as the weewx table_name.
        table_name = archive
        # The schema *must* be the same as the schema of hte archive table
        schema = schemas.wview.schema
        # Don't do any aggregations for backup
        manager = weewx.manager.Manager



[Databases]
    # This section defines the actual databases
    
    # A SQLite database is simply a single file
    # This should point to the same database as in weewx.conf
    # The user ID that runs the backup only needs read access to this file.
    [[archive_sqlite]]
        root = %(WEEWX_ROOT)s
        database_name = /var/lib/weewx/weewx.sdb
        driver = weedb.sqlite
    
    # MySQL require a server (host) with name and password for access
    # This should point to the same database as in weewx.conf, but the user
    # here can be different as only read (select) privileges are needed.
    [[archive_mysql]]
        host = localhost
        user = wx-read
        password = wxpassword
        database_name = weewx
        driver = weedb.mysql
    
    # SQLite database for backup/replication
    # A SQLite database is simply a single file
    # The user ID that runs the backup must have write access to this file, and its containing
    # directory if the file does not already exist.
    [[replicate_sqlite]]
        root = %(WEEWX_ROOT)s
        database_name = /var/lib/weewx-backup/weewx_backup.sdb
        driver = weedb.sqlite
    
    # MySQL database for backup / remote replication
    # The user specified here must have write access.
    [[replicate_mysql]]
        host = 
        user = 
        password = 
        database_name = weewx_backup
        driver = weedb.mysql

