Page 1 of 1
full backup (SOLVED)
Posted: Mon Aug 22, 2022 8:33 am
by zemerdon
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.
Re: full backup
Posted: Mon Aug 22, 2022 8:36 pm
by Andyrh
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.
Re: full backup
Posted: Mon Aug 22, 2022 9:02 pm
by zemerdon
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.
Re: full backup
Posted: Mon Aug 22, 2022 9:12 pm
by Andyrh
I also use the backup to restore a test system and test major upgrades.
Re: full backup
Posted: Mon Aug 22, 2022 11:27 pm
by zemerdon
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.