Backup - Restore ZM+Database+Filesystem

A place for discussion of topics that are not specific to ZoneMinder. This could include Linux, Video4Linux, CCTV cameras or any other topic.
Post Reply
ktheking
Posts: 70
Joined: Fri Oct 12, 2007 11:53 am

Backup - Restore ZM+Database+Filesystem

Post by ktheking »

I'm searching to setup a configuration where trough a GUI these things can be achieved :

-backup+restore filesystem
-backup+restore MySQL DB
-backup+restore ZM config


-backup+restore filesystem :
The cheapest most reliable , no nonsense way is to use an external box where everything is on it ,and which would work in RAID0+1.
The firmware would take care about rebuilding stuff.
More in this post about that : http://www.zoneminder.com/forums/viewtopic.php?t=11448
Test are yet to come.

-backup+restore MySQL DB :
trough script already present here : http://www.zoneminder.com/forums/viewtopic.php?t=5381
Some out of the box GUI backup/restore tools :
ZRM : http://www.zmanda.com/zrm-mysql-enterprise.html (altough not free)
SQLYOG : http://code.google.com/p/sqlyog/
If someone knows a good reliable free one ... ?
not found any reliable ones yet ...
Some other ways of backuping :
database replication
http://www.howtoforge.com/mysql_database_replication
LVM snapshots
http://www.ubuntux.org/back-up-and-rest ... -snapshots
Mysqlhotcopy
http://www.vbulletin.com/forum/showthread.php?t=134821
mylvmbackup
http://lenz.homelinux.org/mylvmbackup/
mylvmbackup is a tool for quickly creating backups of a MySQL server's data files. To perform a backup, mylvmbackup obtains a read lock on all tables and flushes all server caches to disk, creates a snapshot of the volume containing the MySQL data directory, and unlocks the tables again. The snapshot process takes only a small amount of time. When it is done, the server can continue normal operations, while the actual file backup proceeds.

The LVM snapshot is mounted to a temporary directory and all data is backed up using the tar program. By default, the archive file is created using a name of the form backup-YYYYMMDD_hhmmss_mysql.tar.gz, where YYYY, MM, DD, hh, mm, and ss represent the year, month, day, hour, minute, and second of the time at which the backup occurred. The prefix backup and the date format can be modified. The use of timestamped archive names allows you to run mylvmbackup many times without danger of overwriting old archives.

Alternatively, instead of tar, you may use rsync. This process is nearly identical, with the exception that the file suffix is not used.
backup+restore ZM config :
trough script already present here : http://www.zoneminder.com/forums/viewtopic.php?t=5381
no gui solution found yet



If anyone has usefull info about improving these 3 needtohave's ,feel free to add it to the thread.[/quote]
Last edited by ktheking on Sun Oct 19, 2008 3:49 pm, edited 10 times in total.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

There is a DB backup facility in zmupdate.pl which you may not be aware of. It just creates mysqldump sql files and there is no gui etc.
Phil
ktheking
Posts: 70
Joined: Fri Oct 12, 2007 11:53 am

Post by ktheking »

updated previous post : mylvmbackup
ktheking
Posts: 70
Joined: Fri Oct 12, 2007 11:53 am

Post by ktheking »

Based on article I've read today in CT magazine. It seems to be possible to setup a master/slave combination for mysql.
If this should work ,that would actually mean that playing around with backup sets IS possible. (combining this way of working with LVM snaphots on hot pluggable disks, or using hardware raid with hot pluggable disks).

Anyway this I feel will be the proper way of working ,in order to have a full redundant system. That enables us to have a full working backup.

Some (a lot) experimenting will be needed.

Hoping to post some findings over here soon.

Kind regards,

K.
Post Reply