20.04.2013 21:24, Nikolay Samofatov wrote: > Hello, All! > > We use NBACKUP for physical replication of the databases. For that we added 2 > features: > > 1) We only read one sector (with header) of each page when scanning for > changes. This is helpful for > SSD media and might provide 4x-32x speed up. > This is probably not important for FB3, as it will have SCN pages, but is > very useful optimization > for 2.X ODS. > > 2) We added option into NBACKUP utility to create change set based on > baseline GUID rather than level. > > -B <level>|<GUID> <database> [<filename>] Create incremental backup > > This is the same GUID that is displayed in GSTAT output: > > Database backup GUID: {35F5915A-4A62-4A27-AD91-6FB0EBDCCF11} > > To update offline copy of the database over WAN we use the following > procedure in a shall script: > - obtain baseline GUID of the database using GSTAT -h > - pull changes using SSH+NBACKUP using baseline GUID > - if pull is successful apply changes to a local copy > - if incremental pull fails get clean copy of the database using "NBACKUP -B > 0", CAT and DD (we have > implemented download resume in a shall script) > > Pull might fail if baseline with given GUID doesn't exist in the database (it > was restored from gbak > backup, etc). > > This idea of using nbackup for exact this purpose was in the original design, > data formats, etc > although it was never completed. Changes do not affect engine code. > > If there are no objections to this design I will ask Dmitry Starodubov to > port this code to FB3 and > submit a patch for integration.
The feature (part 2) is committed (with little changes) into master. Basic tests show it works :) If anyone have idea how to improve it - you are welcome. For example, we could introduce special switch to query backup GUID of target database to pass in into backup automatically. Regards, Vlad ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel