On 2016-06-09, Gordon Messmer <gordon.messmer at gmail.com> wrote:> On 06/09/2016 08:18 AM, Alessandro Baggi wrote: >> How I can perform this check? > > > Run rsync with the -c argument.Will this be very slow if Alessandro has a large number of files? OTOH if he really needs to ensure integrity there likely isn't a better option. --keith -- kkeller at wombat.san-francisco.ca.us
where Rsync falls down, is if you need a point in time snapshot... Rsync processes one file at a time, so if the files are being updated while its running, the differnet files will be copied at different times. This is usually fine for static archives of files and such, but unsuitable for a database server where random updates are being made of various files and they all have to be consistent. -- john r pierce, recycling bits in santa cruz
On Thu, June 9, 2016 1:14 pm, John R Pierce wrote:> where Rsync falls down, is if you need a point in time snapshot... Rsync > processes one file at a time, so if the files are being updated while > its running, the differnet files will be copied at different times. > This is usually fine for static archives of files and such, but > unsuitable for a database server where random updates are being made of > various files and they all have to be consistent. >When databases are concerned, I would never rely on a snapshot of their storage files. Either stop relevant daemon(s), then do fs snapshot, or better though do dbdump and restore databases from dump when you need to restore it. Also: databases usually have "hold transactions" flag or similar, post this flag before making dump, and remove flag after dump has been done. This last will ensure consistent state of everything in your dump. I usually use combination: I do dbdump, and back up these dump files on regular backup schedule (and exclude db files from backup). I hope, this helps. Valeri> > -- > john r pierce, recycling bits in santa cruz > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++
On 06/09/2016 10:56 AM, Keith Keller wrote:> On 2016-06-09, Gordon Messmer <gordon.messmer at gmail.com> wrote: >> On 06/09/2016 08:18 AM, Alessandro Baggi wrote: >>> How I can perform this check? >> Run rsync with the -c argument. > Will this be very slow if Alessandro has a large number of files? OTOH > if he really needs to ensure integrity there likely isn't a better > option.Yes, but no slower than any other method of checking the files on each side for corruption.
On 06/09/2016 11:14 AM, John R Pierce wrote:> Rsync processes one file at a time, so if the files are being updated > while its running, the differnet files will be copied at different > times. This is usually fine for static archives of files and such, > but unsuitable for a database server where random updates are being > made of various files and they all have to be consistent.You could create a snapshot and then rsync that to a backup: https://bitbucket.org/gordonmessmer/dragonsdawn-snapshot You could also use the "snapshot" project with rsnapshot, using this patch: https://github.com/rsnapshot/rsnapshot/pull/44