Good afternoon,
I have over a years worth of surveillance and i just had the scare of a lifetime when upgrading to 1.36.24 broke. I was able to downgrade then upgrade again and it magically worked.
Excuse my ignorance, but is there a method to fully backup zoneminder with all the events and database ?
Any information is greatly appreciated.
full backup (SOLVED)
full backup (SOLVED)
Last edited by zemerdon on Mon Aug 22, 2022 11:28 pm, edited 1 time in total.
Re: full backup
I backup my DB every day and have just started a process to backup the last 7 days of events.
The DB backup is easy as it is small. The events are a challenge due to size.
This is the command I use to backup the DB. Use at your own risk.
mysqldump -u root -p<CoolPassword> zm | gzip -8 -f > /zm/store1/dbbackup/zmdb.sql-"`date +"%d"`".gz
This produces a zip file with today's day number, so I keep 31 backups and I do not have to worry about purging as they overwrite.
The process to backup events is a rsync script that runs every 10 minutes. Then there is a purge script. Less easy.
The DB backup is easy as it is small. The events are a challenge due to size.
This is the command I use to backup the DB. Use at your own risk.
mysqldump -u root -p<CoolPassword> zm | gzip -8 -f > /zm/store1/dbbackup/zmdb.sql-"`date +"%d"`".gz
This produces a zip file with today's day number, so I keep 31 backups and I do not have to worry about purging as they overwrite.
The process to backup events is a rsync script that runs every 10 minutes. Then there is a purge script. Less easy.
Andy
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
Re: full backup
Thank you so much for your reply.
Just did a quick google for events and it just looks like a space thing and easy enough to configure should i wish to change event storage location.. Im thinking i could just use LuckyBackup and run it nightly to keep a couple of snapshots on a dedicated HDD.
Just did a quick google for events and it just looks like a space thing and easy enough to configure should i wish to change event storage location.. Im thinking i could just use LuckyBackup and run it nightly to keep a couple of snapshots on a dedicated HDD.
Re: full backup
I also use the backup to restore a test system and test major upgrades.
Andy
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
Re: full backup
Thats a brilliant idea. I run mine in a VM so i think i will do the same. Thank you for the ideas and wonderful advice which will put my mind at ease, now i can implement an automated backup and also a test environment.
Marking this as solved.
Marking this as solved.