Our task is to find a method for linux operating systems to automatically upload zoneminder motion detection events to Box.com cloud storage. I have 3 monitors created on zoneminder and events are stored in 3 separate storage areas. The storage details are shown in the following figure. This blog post explains how to sync events of 3 ZM monitors with 3 folders in Box.com cloud storage. Figure :-1 Box.com cloud service provides free 10 Gb storage for personal use. Box management has announced that they will deprecate support for WebDAV after Jan 31, 2019 .Therefore other alternatives have to be found to sync data in linux platforms with Box.com cloud service. The syncing facility is provided only for Microsoft Windows by Box.com. Git-annex is a very good open source software for linux operating systems to solve the above problem in syncing with Box.com cloud . How to install git-annex on Ubuntu 18.04 on the Ubuntu terminal sudo apt update sudo add-apt-repository ppa:kelleyk/git-annex sudo apt update sudo apt install git-annex In order to use events files in git-annex, the files at /var/cache/zoneminder/events , /mnt/sdb/zoneminder/events, and /mnt/sda3/zoneminder/events have to be given read and write permissions On the Ubuntu terminal sudo chown -R www-data:www-data /var/cache/zoneminder/events sudo chmod -R g+w /var/cache/zoneminder/events sudo chown -R www-data:www-data /mnt/sdb/zoneminder/events sudo chmod -R g+w /mnt/sdb/zoneminder/events sudo chown -R www-data:www-data /mnt/sda3/zoneminder/events sudo chmod -R g+w /mnt/sda3/zoneminder/events Connecting zoneminder events to dedicated drives Create a config file under /etc/zm/conf.d . Name the file anything you want just as long as it ends in “.conf”. Add the following content to the file and save your changes: (In my case I have used ajp.conf as the file name ) sudo gedit /etc/zm/conf.d/ajp.conf and pasted following codes and saved the file in /etc/zm/conf.d After installing get a git-annex you will get a launcher icon on the computer When you double click on the launcher git-annex dashboard will appear on the web browser. Adding repository for /mnt/sdb/zoneminder/events (figure 2 to figure 8 ) Figure :-2 Adding repository for /var/cache/zoneminder/events Figure :- 4 Adding login details for Box.com note :- Select encryption disable Figure :- 5 Automatically uploading events to Box.com Figure :- 7 Uploaded files on annex folder in Box.comFigure :- 8 git-annex folder on git-annex console Figure :- 9 Adding repository for /mnt/sda3/zoneminder/events Adding repository for /mnt/sdb/zoneminder/events (Figure 10 to figure 6) Figure :- 10 Figure :- 11 Figure :- 12 Figure :- 13 Figure :- 14 Figure :- 15 Figure :- 16 Figure :- 16 Uploaded events of 3 storage folders are underlined in red Figure :- 17 Figure :- 18 You can see 3 repositories on git-annex dashboard for 3 zoneminder monitors Figure :- 19 You can see in Figure :- 19 , the git-annex daemon will start at the boot time to facilitate automatic syncing
0 Comments
Leave a Reply. |
AuthorRetired Director of Irrigation ,Sri Lanka Categories
All
Archives
March 2020
|