Skip to main content

Move Installation

Move your ParkPow OnPremise Installation from machine A to a new machine B which could be offline.

Backup ParkPow on Machine A#

Successfully install ParkPow#

Follow the instructions from here
After a succefull run, Stop ParkPow then create a local folder that will hold all items to export

mkdir /home/user/parkpow
note

Everything that will need to be moved physically is saved to this single folder /home/user/parkpow.
If you need to use a different folder, update everywhere the path is used in all below commands.

Backup ParkPow images#

Export the docker images used by Parkpow as tar archives

docker save platerecognizer/parkpow-postgres > /home/user/parkpow/parkpow-postgres.tardocker save platerecognizer/parkpow-app > /home/user/parkpow/parkpow-app.tar

Optionaly, Compress the archives to reduce the sizes,

cd /home/user/parkpow/xz -9 parkpow-postgres.tarxz -9 parkpow-app.tar

Backup ParkPow Volumes#

Export the docker volumes used by Parkpow as tar archives

docker run --rm \   --user root \   --volumes-from parkpow_db_1 \   -v /home/user/parkpow:/backup \   platerecognizer/parkpow-app tar cvf /backup/db.tar /var/lib/postgresql/data
docker run --rm \   --user root \   --volumes-from parkpow_web_1 \   -v /home/user/parkpow:/backup \   platerecognizer/parkpow-app tar cvf /backup/app.tar /app

Move Backup to Machine B#

Copy the folder /home/user/parkpow to machine B, you can use a removable storage such as a flash drive.

tip

If copying over a network, we recommend not skipping the compression step for images to save on time.

note

All below commands assume the folder was copied to the same location on machine B.
If you copy to a new location, ensure to replace /home/user/parkpow with the new location path.

Restore Backup on Machine B#

Restore ParkPow images#

Restore ParkPow images previously exported.

docker load < /home/user/parkpow/parkpow-postgres.tardocker load < /home/user/parkpow/parkpow-app.tar

If the images were compressed, Use below commands instead

docker load < /home/user/parkpow/parkpow-postgres.tar.xzdocker load < /home/user/parkpow/parkpow-app.tar.xz

Initialize ParkPow#

Try running ParkPow so that Docker creates the necesarry containers and volumes.
Go to the docker-compose.yml folder, cd /home/user/parkpow, and run this command:

cd /home/user/parkpowdocker-compose up

You should see an error message because of licensing. Enter CTR+C to then go the next step.

Restore ParkPow Volumes#

docker run --rm \   --user root \   --volumes-from parkpow_db_1 \   -v /home/user/parkpow:/backup \   platerecognizer/parkpow-app bash -c "cd /var && tar xvf /backup/db.tar --strip 1"
docker run --rm \   --user root \   --volumes-from parkpow_web_1 \   -v /home/user/parkpow:/backup \   platerecognizer/parkpow-app bash -c "cd /app && tar xvf /backup/app.tar --strip 1"

Run ParkPow#

Go to the docker-compose.yml, cd /home/user/parkpow, folder and run this command:

cd /home/user/parkpowdocker-compose up