You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then you can use kernelcare/eportal:2.8-1 image to run container as usual.
296
+
204
297
## Allowed hosts
205
298
206
299
We must declare the list of allowed hosts in the configuration for security reasons. It help to avoid HTTP Host header attacks. According to your installation, you need to add this parameter into [ePortal config file](#config-files):
@@ -1389,7 +1482,7 @@ If you migrate from Debian-based to Debian-based system you can simply:
1389
1482
* Stop ePortal on both hosts.
1390
1483
* Copy `/var/lib/eportal` to a new host. Note: directory owner must stay as `eportal:eportal`.
1391
1484
* Copy config `/etc/eportal/config` if it exists.
1392
-
* Run migration `/usr/share/kcare-eportal/migratedb.py --upgrade` on a new host.
1485
+
* Run migration `/usr/share/kcare-eportal/migratedb.py` on a new host.
1393
1486
* Start ePortal on a new host.
1394
1487
1395
1488
Migration from RHEL-based distro is more elaborate. Later we refer to a `$BASE_DIR` variable in scripts. You can export it for RHEL-based distros:
@@ -1449,14 +1542,30 @@ For Debian-based distros:
1449
1542
[new-host ~]# chown -R eportal:eportal $BASE_DIR
1450
1543
```
1451
1544
1452
-
* Run migration `/usr/share/kcare-eportal/migratedb.py --upgrade` on a new host.
1545
+
* Run migration `/usr/share/kcare-eportal/migratedb.py` on a new host.
1453
1546
1454
1547
* Start ePortal on the new host:
1455
1548
1456
1549
```text
1457
1550
[new-host ~]# systemctl start eportal
1458
1551
```
1459
1552
1553
+
### Migration to docker container
1554
+
1555
+
Let's suppose that we're going to use dockerized eportal on the same host.
1556
+
1557
+
The easiest way to migrate is to reuse the data directory. It can be mounted when the container starts.
1558
+
1559
+
```text
1560
+
docker run -d --rm --network=host -v /var/lib/eportal:/var/lib/eportal/data kernelcare/eportal:latest
1561
+
```
1562
+
1563
+
If you prefer to use a named volume for data-dir then all data should be copied from ```/var/lib/eportal``` to the volume (see [Docker docs](https://docs.docker.com/reference/cli/docker/container/cp/))
1564
+
1565
+
If you have custom configuration at ```/etc/eportal/config``` you can pass it using environment variables or
1566
+
mount this configuration file directly into the container like this ```-v /etc/eportal/config:/etc/eportal/config:ro```
1567
+
1568
+
1460
1569
## Backup and restore
1461
1570
1462
1571
### Create backup
@@ -1489,6 +1598,28 @@ For example:
1489
1598
`download-missing` commands ensure patchset state on disk corresponds with a state
1490
1599
in db.
1491
1600
1601
+
### Backup and restore for ePortal docker container
1602
+
1603
+
Volume backup process can be performed according to the instructions given [here](https://docs.docker.com/engine/storage/volumes/#back-up-restore-or-migrate-data-volumes).
1604
+
For example:
1605
+
```text
1606
+
docker run --rm --volumes-from eportal -v $(pwd):/backup ubuntu tar cvf /backup/backup.tar /var/lib/eportal/data/
1607
+
```
1608
+
1609
+
or if you want to make a backup without patches (only configs and the database)
1610
+
```text
1611
+
docker run --rm --volumes-from eportal -v $(pwd):/backup ubuntu tar
1612
+
--exclude '/var/lib/eportal/data/patches'
1613
+
--exclude '/var/lib/eportal/data/arch'
1614
+
--exclude '/var/lib/eportal/data/resources'
1615
+
-cvf /backup/backup.tar /var/lib/eportal/data/
1616
+
```
1617
+
1618
+
That backup could be restored like this
1619
+
```text
1620
+
docker run --rm --volumes-from eportal2 -v $(pwd):/backup ubuntu bash -c "cd / && tar xvf /backup/backup.tar"
1621
+
```
1622
+
1492
1623
## Config files
1493
1624
1494
1625
* ePortal config: `/etc/eportal/config`. Config for old versions (<1.35): `/usr/share/kcare-eportal/local.py`.
0 commit comments