mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-19 17:06:36 +00:00
Update geo-support.mdx (#224)
This commit is contained in:
@@ -23,38 +23,11 @@ After downloading, the management system prepares the databases for use. If the
|
||||
## Updating the GeoLite2 Database
|
||||
|
||||
The GeoLite2 databases are updated twice a week to reflect changes in geolocation data. It's crucial to keep your
|
||||
local GeoLite2 databases updated. You can achieve this manually through the script provided below.
|
||||
local GeoLite2 databases updated. When the `management` service is started, the service will query the [Download URLs](#downloading-the-databases) to check
|
||||
if the current database is outdated. If the database is outdated or does not exist, the files will be downloaded
|
||||
and loaded automatically. Restarting the `management` service will trigger the update check.
|
||||
|
||||
Here are the steps to update the GeoLite2 databases:
|
||||
|
||||
### Step 1. Switch to the infrastructure files directory:
|
||||
```bash
|
||||
cd netbird/infrastructure_files/
|
||||
```
|
||||
|
||||
### Step 2. Run the script to download the GeoLite2 databases:
|
||||
```bash
|
||||
./download-geolite2.sh
|
||||
```
|
||||
After successfully running the script, two database files (`geonames.db` and `GeoLite2-City.mmdb`) are created in the
|
||||
`netbird/infrastructure_files/` directory.
|
||||
|
||||
### Step 3. The next step involves moving these files into our management service container.
|
||||
|
||||
Move the `geonames.db` database:
|
||||
```bash
|
||||
docker-compose cp geonames.db management:/var/lib/netbird/
|
||||
```
|
||||
|
||||
Move the `GeoLite2-City.mmdb` database:
|
||||
```bash
|
||||
docker-compose cp GeoLite2-City.mmdb management:/var/lib/netbird/
|
||||
```
|
||||
|
||||
4. To complete the process, restart the management service to ensure that it loads the updated databases:
|
||||
|
||||
```bash
|
||||
docker-compose restart management
|
||||
```
|
||||
This completes the upgrade process. Your GeoLite2 databases are now up-to-date.
|
||||
By following the guide above, your GeoLite2 databases should always be updated with the latest geolocation data.
|
||||
This behavior can be disabled by passing the `--disable-geolite-update` flag to the `management` command. When
|
||||
`--disable-geolite-update` is set, the service will download the geolite databases only if there is no file in the data directory. The database with the
|
||||
most recent date will be loaded if more than one exists. If a database does not exist, it will be downloaded
|
||||
and loaded, but it will not be updated on subsequent restarts of the `management` service.
|
||||
|
||||
Reference in New Issue
Block a user