full backup (SOLVED)

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
zemerdon
Posts: 16
Joined: Wed Dec 01, 2021 2:23 pm

full backup (SOLVED)

Post 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.
Last edited by zemerdon on Mon Aug 22, 2022 11:28 pm, edited 1 time in total.
User avatar
Andyrh
Posts: 302
Joined: Sat Oct 28, 2017 3:55 am

Re: full backup

Post 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.
Andy
o||||o

Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
zemerdon
Posts: 16
Joined: Wed Dec 01, 2021 2:23 pm

Re: full backup

Post 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.
User avatar
Andyrh
Posts: 302
Joined: Sat Oct 28, 2017 3:55 am

Re: full backup

Post by Andyrh »

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
zemerdon
Posts: 16
Joined: Wed Dec 01, 2021 2:23 pm

Re: full backup

Post 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.
Post Reply