Den 2014-05-05 22:27 skrev Steffen Heil (Mailinglisten) såhär:
>
> I know that nbackup keeps track of which blocks in the database 
> changed and which did not so that backups contain only the blocks that 
> changes since the last backup of the next lower level.
> I want to use that feature to do syncs between servers.
>
> I could simply create backups with incrementing levels, move the 
> backup to the other server(s) and apply them there (that database is 
> offline).
> However, I suspect there is a limit for the number of backup levels a 
> database can have.
>

You don't need a lot of backup levels to do what you want. For example, 
Do a level 0 backup once a month/year/whatever, then do a level 1 backup 
every weekend, a level 2 backup every day, and if required a level 3 
backup every hour/whatever.

Copy the backup files to the remote server, and use nbackup there, to 
restore the most current backup chain. Granted, the restore operations 
on the other server(s) will take a bit of time, but if those servers are 
offline, that would not really be a problem. In fact, I see no real 
point in doing those restores until you actually need to put the backup 
online. Just save the most recent chain of backup files, and you're 
ready to do a restore when the need arises.

> Another strategy would be to lock the database, take a copy, unlock it 
> and then use external software to do the diff.
> However that would mean that the database would have to be copied very 
> often and that a lot of extra space was needed.
> That would mean a lot of disc io.
>
> That could be reduced, if I locked the database, sync it using some 
> software as rsync and then unlock it again.
> I would not need extra copies any more, but a) the database would need 
> to be offline much longer (remote sync needs more time) and b) it 
> would have to be done for every replica again.
>

This is the approach I use for my 100+ Gbyte database on modest hardware 
(Windows server with 7200 rpm scsi traditional non-ssd harddisks). I use 
FastCopy (http://ipmsg.org/tools/fastcopy.html.en) to copy the database 
files while it's locked and then rsync the copy to our backup server. 
The FastCopy takes about 45-60 minutes and the rsync usually takes a 
couple of hours.

There is NO downtime! The application is online when the database is 
locked and of course also during rsync.

> So here are my questions:
>
> a) How many levels of backups can a database have (nbackup, not gbak)?
>

Sorry, I don't know. But I don't think you need more than 3-5 levels.

> b) How bad is it (in terms of performance) to lock a database for a 
> longer period of time?
>

I've seen no problems whatsoever with the scheme I described, in which 
the database is locked for about an hour. I don't see how/why you would 
need any more than that.

> c) Is there any way to get the information used by nbackup without 
> actually creating a new backup level? (Just use this information to 
> use external block copying?)
>

Sorry, I don't know.

> d) Is there any other good way to create a live exact replica?
>

Shadow file feature? Third paerty replication tools?

Regards,
Kjell


Reply via email to