# Import your weewx history

URL: https://pro-weather.com/docs/getting-started/import-weewx

> Migrate years of archived weather data from weewx into Pro Weather - the database is read in your browser, nothing is uploaded, and re-running is always safe.

If you have been running [weewx](https://weewx.com), your station's whole
history sits in its archive database. You can bring that history with you:
imported records show up in the historical charts, the records page and the
almanac, exactly as if Pro Weather had been collecting them all along.

## What you need

- A **PRO subscription or active trial** (history is a PRO feature).
- Your weewx **SQLite database file**. On a standard install that is
  `/var/lib/weewx/weewx.sdb` (older installs: `/home/weewx/archive/weewx.sdb`).
  Copy it off the machine, e.g.
  `scp pi@raspberrypi:/var/lib/weewx/weewx.sdb .`
- Any browser on a desktop or laptop. The file is parsed **locally in your
  browser** - your database is never uploaded, only the observation values
  travel to us.

## Run the import

1. Open **Dashboard → your site → Connection**.
2. Scroll to **Import history from weewx** and pick your `weewx.sdb`.
3. If your site has more than one station, choose which station the history
   belongs to. For hardware that uploads to us directly (the upload URL above
   the import card), that is your local (push) station.
4. Click **Import history** and leave the tab open. A multi-year archive
   takes a few minutes; you can watch the progress bar.

When it finishes, charts and records pick the new history up within a few
minutes (caches refresh on their own).

## Good to know

- **Safe to re-run.** Records that already exist - from live uploads or an
  earlier import - are never overwritten. If the import is interrupted, just
  run it again; already-imported records are skipped.
- **All weewx unit systems work.** US, METRIC and METRICWX databases (and even
  mixed ones) are converted automatically.
- **What comes across:** temperature, humidity, dew point, heat index, wind
  chill, barometer and station pressure, wind speed/gust/direction, wind run,
  rain and rain rate, solar radiation, UV, ET, indoor temperature and
  humidity, and particulate matter (PM1/PM2.5/PM10) where present.
- **Old schemas are fine.** Databases created with the classic wview schema
  simply lack some of those columns; whatever exists is imported.
- **Keep weewx running if you like.** Point its Wunderground uploader at your
  upload URL (see [Connect your own hardware](https://pro-weather.com/docs/getting-started/connect-hardware#weewx))
  and live data continues from where the import ends.

## Using MySQL/MariaDB with weewx?

The importer reads SQLite files. Transfer your archive to SQLite first with
weewx's own tool, then import the resulting file:

```bash
# weewx 5.x: define a sqlite binding in weewx.conf, then
weectl database transfer --dest-binding=sqlite_binding
```

The weewx documentation covers the transfer in detail under
"weectl database".
