This commit is contained in:
Eros Nardi 2021-02-07 10:31:16 +01:00
parent 9c5fb1fee8
commit 5abbb63eb0
1 changed files with 19 additions and 0 deletions

View File

@ -16,17 +16,29 @@ _Tested on my Raspberry Pi 4 with SWAG_
Just run the image publishing the port and setting the ENV variables, the shm dedicated and mounting the folder you wish to map. Just run the image publishing the port and setting the ENV variables, the shm dedicated and mounting the folder you wish to map.
`docker run -d \` `docker run -d \`
` --name=ZoneMinder \` ` --name=ZoneMinder \`
` -p 443:443/tcp \` ` -p 443:443/tcp \`
` -e TZ=Europe/Rome \` ` -e TZ=Europe/Rome \`
` -e SELFSIGNED=0 \` ` -e SELFSIGNED=0 \`
` -e FQDN=your.fqdn \` ` -e FQDN=your.fqdn \`
` --shm-size=1.5g \` ` --shm-size=1.5g \`
` -v /mystorage/ZoneMinder/config:/config \` ` -v /mystorage/ZoneMinder/config:/config \`
` -v /mystorage/ZoneMinder/zmcache:/var/cache/zoneminder \` ` -v /mystorage/ZoneMinder/zmcache:/var/cache/zoneminder \`
` -v /mystorage/Swag/etc/letsencrypt/live:/sslcert/live \` ` -v /mystorage/Swag/etc/letsencrypt/live:/sslcert/live \`
` -v /mystorage/Swag/etc/letsencrypt/archive:/sslcert/archive \` ` -v /mystorage/Swag/etc/letsencrypt/archive:/sslcert/archive \`
` --restart unless-stopped \` ` --restart unless-stopped \`
` nardo86/zoneminder` ` nardo86/zoneminder`
The SELFSIGNED flag will , the FQDN will be used for configuring Apache2 and, in case of using the SWAG certificate, find the correct folder and the /config folder will contain msmtp and mysql configuration. The SELFSIGNED flag will , the FQDN will be used for configuring Apache2 and, in case of using the SWAG certificate, find the correct folder and the /config folder will contain msmtp and mysql configuration.
@ -39,12 +51,19 @@ To access the Zoneminder gui, browse to: https://your.fqdn:443/zm
If you need to transfer your data from another instance this method worked for me https://forums.zoneminder.com/viewtopic.php?t=17071: If you need to transfer your data from another instance this method worked for me https://forums.zoneminder.com/viewtopic.php?t=17071:
Backup the old DB Backup the old DB
`root@oldSystem# mysqldump -p zm > /config/zm-dbbackup.sql` `root@oldSystem# mysqldump -p zm > /config/zm-dbbackup.sql`
Restore into the new DB Restore into the new DB
`root@newSystem# mysql -p zm < /config/zm-dbbackup.sql` `root@newSystem# mysql -p zm < /config/zm-dbbackup.sql`
Sync folders Sync folders
`root@newSystem# rsync -r -t -p -o -g -v --progress --delete user@oldSystem:/var/cache/zoneminder/* /var/cache/zoneminder/` `root@newSystem# rsync -r -t -p -o -g -v --progress --delete user@oldSystem:/var/cache/zoneminder/* /var/cache/zoneminder/`
Init / cleanup Init / cleanup
`root@newSystem# zmaudit.pl` `root@newSystem# zmaudit.pl`