Page 1 of 1
Monitor Backup process
Posted: Friday 12 February 2021 14:12
by McMelloW
Hi Domoticans
To monitor Domoticz, I use Monit. This works fine. Now I want to use RaspiBackup to backup the entire SD-Card of my Raspberry. During this backup I have to stop Domoticz and start it again when the backup is finished. However, Monit starts Domoticz again before the backup is finished.
I want to stop monitoring Domoticz, stop Domoticz
Start monitoring the backup process by Monit.
When the backup is finished successful stop monitoring raspibackup
Start Domoticz again and start the monitoring of domoticz.
Who can help how to set this up.
Re: Monitor Backup process
Posted: Friday 12 February 2021 16:18
by waaren
McMelloW wrote: ↑Friday 12 February 2021 14:12
To monitor Domoticz, I use Monit. This works fine. Now I want to use RaspiBackup to backup the entire SD-Card of my Raspberry. During this backup I have to stop Domoticz and start it again when the backup is finished. However, Monit starts Domoticz again before the backup is finished.
Assuming you domoticz process is named domoticz in monit and your backup process is named backup
Code: Select all
sudo monit unmonitor domoticz
sudo monit stop domoticz
sudo monit start backup
sudo monit monitor backup
sudo monit unmonitor backup
sudo monit stop backup # maybe not needed as it finished ?
sudo monit start domoticz
sudo monit monitor domoticz
Re: Monitor Backup process
Posted: Friday 12 February 2021 17:16
by McMelloW
waaren wrote: ↑Friday 12 February 2021 16:18
McMelloW wrote: ↑Friday 12 February 2021 14:12
To monitor Domoticz, I use Monit. This works fine. Now I want to use RaspiBackup to backup the entire SD-Card of my Raspberry. During this backup I have to stop Domoticz and start it again when the backup is finished. However, Monit starts Domoticz again before the backup is finished.
Assuming you domoticz process is named domoticz in monit and your backup process is named backup
Code: Select all
sudo monit unmonitor domoticz
sudo monit stop domoticz
sudo monit start backup
sudo monit monitor backup
sudo monit unmonitor backup
sudo monit stop backup # maybe not needed as it finished ?
sudo monit start domoticz
sudo monit monitor domoticz
Thanks for your fast reply. Is it that easy? I must have overlooked it in the documentation.
Re: Monitor Backup process
Posted: Saturday 13 February 2021 17:19
by HansieNL
McMelloW wrote: ↑Friday 12 February 2021 14:12
Hi Domoticans
To monitor Domoticz, I use Monit. This works fine. Now I want to use RaspiBackup to backup the entire SD-Card of my Raspberry. During this backup I have to stop Domoticz and start it again when the backup is finished. However, Monit starts Domoticz again before the backup is finished.
I want to stop monitoring Domoticz, stop Domoticz
Start monitoring the backup process by Monit.
When the backup is finished successful stop monitoring raspibackup
Start Domoticz again and start the monitoring of domoticz.
Who can help how to set this up.
You can select Domoticz and Monit services to stop during backup and enable them after backup. You can do that in the RaspiBackup menu.
Re: Monitor Backup process
Posted: Saturday 13 February 2021 17:36
by McMelloW
HansieNL wrote: ↑Saturday 13 February 2021 17:19
You can select Domoticz and Monit services to stop during backup and enable them after backup. You can do that in the RaspiBackup menu.
Yes, that is what I did so far.
I want to do a regular unattended backup at 03:00. I want to monitor the raspiBackup.sh and be sure it all went OK.
Re: Monitor Backup process
Posted: Monday 22 March 2021 11:51
by Kruu
Is it crucial to stop Domoticz during live backup?
Re: Monitor Backup process
Posted: Monday 22 March 2021 13:09
by waaren
Kruu wrote: ↑Monday 22 March 2021 11:51
Is it crucial to stop Domoticz during live backup?
It depends on the tool / commands used. If you use the sqlite3 .backup 'backup filename' command or the domoticz internal backup, you don't have to stop domoticz.
When using tools like cp, rsync or similar you should.