Nico640 / docker-unms

All-in-one docker image for Ubiquiti UISP (formerly UNMS). Supports x86_64 and ARM (Raspberry Pi).
https://hub.docker.com/r/nico640/docker-unms
204 stars 26 forks source link

Issue with upgrading older version of UISP (1.6.5 --> 2.3.57) #103

Open rtucker666 opened 7 months ago

rtucker666 commented 7 months ago

Hi Nico640,

Firstly, thanks for coding and hosting this version of UISP, I run this on a docker container inside Linux and it works wonderfully. However I have 2 issues which I need help with, as I'm not very proficient with Github or Docker commands.

Firstly I would like to upgrade my current container instance of UISP to the latest, as it's very old now. I have tried the pull command but can't seem to get to the next step. I have a persistent volume set up, so could you point me in the right direction with some upgrade commands? I have a fully operational and live WISP network so I can't afford to lose the data from the container.

Secondly I would like to move my UISP persistent volume to a different disk as I'm running out of space. Not specifically your realm as not directly associated with the application but wouldn't mind a suggestion here either!

Many Thanks

Nico640 commented 7 months ago

Hi,

do you actually use a docker volume or do you simply mean a local directory that get's passed to the container? Do you use docker compose or did you initially simply start UISP with docker run ...? Can you post the command used for starting / the docker compose file?

A normal update would look something like this:

First of all, make sure to download the latest backup directly from the UISP web interface.

I suggest updating one major version at a time, because Ubiquiti's install script also doesn't allow you to skip major versions as far as I know.

Example for updating without docker compose to 1.7.5 (then 2.2.15, latest)

sudo docker pull nico640/docker-unms:1.7.5
sudo docker stop unms
sudo docker rm unms
docker run -d --name unms -p 80:80 -p 443:443 -p 2055:2055/udp -v </path/to/config>:/config nico640/docker-unms:1.7.5
rtucker666 commented 7 months ago

Hi Nico640,

Thanks for taking the time to help me with this. I installed this a number of years ago and now trying to wrap my brain around the installation. I have a windows PC with docker desktop installed, but also a linux distribution on the same computer (I guess this was a prerequisite for UISP?). UISP is running in a container in docker desktop with a volume for persistent storage (not a bind mount). See pics for clarification. I don't use the command line too often, mostly if the container crashes I use the restart button on the container.

Please find below the 'copy docker run' command from Docker Desktop, I'm not using Docker Compose.

docker run --hostname=84a2ced97dde --mac-address=02:42:ac:11:00:02 --env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/app/unms/node_modules/.bin:/opt/rabbitmq/sbin:/usr/local/openresty/bin --env=NODE_VERSION=16.13.1 --env=YARN_VERSION=1.22.15 --env=S6_OVERLAY_ARCH=x86_64 --env=S6_KEEP_ENV=1 --env=APK_ARCH=x86_64 --env=LIBVIPS_VERSION=8.12.2 --env=OPEN_RESTY_VERSION=openresty-1.21.4.1 --env=PHP_VERSION=php-7.4.26 --env=PHP_INI_DIR=/usr/local/etc/php --env=SYMFONY_ENV=prod --env=LIBCLERI_VERSION=0.12.2 --env=SIRIDB_VERSION=2.0.45 --env=QUIET_MODE=0 --env=PUBLIC_HTTPS_PORT=443 --env=PUBLIC_WS_PORT=443 --env=HTTP_PORT=80 --env=HTTPS_PORT=443 --volume=servervol:/config --volume=/config --workdir=/home/app/unms -p 2055:2055/udp -p 443:443 -p 80:80 --restart=unless-stopped --runtime=runc -d nico640/docker-unms:latest

This is all on one drive on the windows machine (same as OS disk). It would be cool to find a way to move or just re-map the 'servervol' volume to a new drive. Or maybe move the entire Linux distribution to a new drive if that's easier? The Linux distribution is "Alpine Linux version 3.15".

Cheers

On Tue, 27 Feb 2024 at 10:54, Nico640 @.***> wrote:

Hi,

do you actually use a docker volume or do you simply mean a local directory that get's passed to the container? Do you use docker compose or did you initially simply start UISP with docker run ...? Can you post the command used for starting / the docker compose file?

A normal update would look something like this:

First of all, make sure to download the latest backup directly from the UISP web interface.

I suggest updating one major version at a time, because Ubiquiti's install script also doesn't allow you to skip major versions as far as I know.

Example for updating without docker compose to 1.7.5 (then 2.2.15, latest)

sudo docker pull nico640/docker-unms:1.7.5 sudo docker stop unms sudo docker rm unms docker run -d --name unms -p 80:80 -p 443:443 -p 2055:2055/udp -v </path/to/config>:/config nico640/docker-unms:1.7.5

— Reply to this email directly, view it on GitHub https://github.com/Nico640/docker-unms/issues/103#issuecomment-1965365708, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGLCHWLBJRFPGK4TH44U6JDYVUACVAVCNFSM6AAAAABDUO5LXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRVGM3DKNZQHA . You are receiving this because you authored the thread.Message ID: @.***>

-- Rich Tucker AV & Tech Entrepreneur

rtucker666 commented 7 months ago

docker pics attached!

On Thu, 29 Feb 2024 at 11:33, Rich Tucker @.***> wrote:

docker pic 1

On Thu, 29 Feb 2024 at 11:32, Rich Tucker @.***> wrote:

Hi Nico640,

Thanks for taking the time to help me with this. I installed this a number of years ago and now trying to wrap my brain around the installation. I have a windows PC with docker desktop installed, but also a linux distribution on the same computer (I guess this was a prerequisite for UISP?). UISP is running in a container in docker desktop with a volume for persistent storage (not a bind mount). See pics for clarification. I don't use the command line too often, mostly if the container crashes I use the restart button on the container.

Please find below the 'copy docker run' command from Docker Desktop, I'm not using Docker Compose.

docker run --hostname=84a2ced97dde --mac-address=02:42:ac:11:00:02 --env=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/app/unms/node_modules/.bin:/opt/rabbitmq/sbin:/usr/local/openresty/bin --env=NODE_VERSION=16.13.1 --env=YARN_VERSION=1.22.15 --env=S6_OVERLAY_ARCH=x86_64 --env=S6_KEEP_ENV=1 --env=APK_ARCH=x86_64 --env=LIBVIPS_VERSION=8.12.2 --env=OPEN_RESTY_VERSION=openresty-1.21.4.1 --env=PHP_VERSION=php-7.4.26 --env=PHP_INI_DIR=/usr/local/etc/php --env=SYMFONY_ENV=prod --env=LIBCLERI_VERSION=0.12.2 --env=SIRIDB_VERSION=2.0.45 --env=QUIET_MODE=0 --env=PUBLIC_HTTPS_PORT=443 --env=PUBLIC_WS_PORT=443 --env=HTTP_PORT=80 --env=HTTPS_PORT=443 --volume=servervol:/config --volume=/config --workdir=/home/app/unms -p 2055:2055/udp -p 443:443 -p 80:80 --restart=unless-stopped --runtime=runc -d nico640/docker-unms:latest

This is all on one drive on the windows machine (same as OS disk). It would be cool to find a way to move or just re-map the 'servervol' volume to a new drive. Or maybe move the entire Linux distribution to a new drive if that's easier? The Linux distribution is "Alpine Linux version 3.15".

Cheers

On Tue, 27 Feb 2024 at 10:54, Nico640 @.***> wrote:

Hi,

do you actually use a docker volume or do you simply mean a local directory that get's passed to the container? Do you use docker compose or did you initially simply start UISP with docker run ...? Can you post the command used for starting / the docker compose file?

A normal update would look something like this:

First of all, make sure to download the latest backup directly from the UISP web interface.

I suggest updating one major version at a time, because Ubiquiti's install script also doesn't allow you to skip major versions as far as I know.

Example for updating without docker compose to 1.7.5 (then 2.2.15, latest)

sudo docker pull nico640/docker-unms:1.7.5 sudo docker stop unms sudo docker rm unms docker run -d --name unms -p 80:80 -p 443:443 -p 2055:2055/udp -v </path/to/config>:/config nico640/docker-unms:1.7.5

— Reply to this email directly, view it on GitHub https://github.com/Nico640/docker-unms/issues/103#issuecomment-1965365708, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGLCHWLBJRFPGK4TH44U6JDYVUACVAVCNFSM6AAAAABDUO5LXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRVGM3DKNZQHA . You are receiving this because you authored the thread.Message ID: @.***>

-- Rich Tucker AV & Tech Entrepreneur

-- Rich Tucker AV & Tech Entrepreneur

-- Rich Tucker AV & Tech Entrepreneur

Nico640 commented 6 months ago

Hi,

im not very familiar with Docker Desktop or Docker Volumes. If your Docker Desktop installation is using the WSL 2 backend, which you can check in the Docker Desktop settings under Resources, then you should be able to move the whole WSL 2 linux VM to a different location somehow like this: https://dev.to/kim-ch/move-docker-desktop-data-distro-out-of-system-drive-4cg2

If you are not using the WSL 2 backend, then I think you can simply change the location in the Docker Desktop Resources settings, though I am not sure if that will retain the existing data. If not, you might need to export and later import the volume, e.g. https://docs.docker.com/storage/volumes/#back-up-restore-or-migrate-data-volumes (shutdown UISP prior to doing this)

Also, don't forget to download a UISP backup before doing any of this, so that you can always roll back if something goes wrong. Also, because your UISP data seems to be very important, I guess it wouldn't hurt to also export the volume (second link) in addition to downloading a UISP backup, so that there a two separate backups.

rtucker666 commented 6 months ago

Hi Nico640,

All good. If I end up losing the volume I can always restore from the backup. Thanks for the tips.

Cheers

On Mon, 11 Mar 2024 at 11:10, Nico640 @.***> wrote:

Hi,

im not very familiar with Docker Desktop or Docker Volumes. If your Docker Desktop installation is using the WSL 2 backend, which you can check in the Docker Desktop settings under Resources, then you should be able to move the whole WSL 2 linux VM to a different location somehow like this: https://dev.to/kim-ch/move-docker-desktop-data-distro-out-of-system-drive-4cg2

If you are not using the WSL 2 backend, then I think you can simply change the location in the Docker Desktop Resources settings, though I am not sure if that will retain the existing data. If not, you might need to export and later import the volume, e.g. https://docs.docker.com/storage/volumes/#back-up-restore-or-migrate-data-volumes

Also, don't forget to download a UISP backup before doing any of this, so that you can always roll back if something goes wrong.

— Reply to this email directly, view it on GitHub https://github.com/Nico640/docker-unms/issues/103#issuecomment-1987378980, or unsubscribe https://github.com/notifications/unsubscribe-auth/BGLCHWPUD27GV5H2PJDP7RLYXTK4ZAVCNFSM6AAAAABDUO5LXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGM3TQOJYGA . You are receiving this because you authored the thread.Message ID: @.***>

-- Rich Tucker AV & Tech Entrepreneur