[rrd-users] Locking *read* (copy/backup) of RRD files?

bern Jochen.Bern at LINworks.de
Mon Oct 25 19:31:50 CEST 2010


Hello everyone,

I'd like to be able to make backups of RRD files while Nagios is happily
writing data to them. From what I've read so far,

-- a plain "cp" (or, for that matter, rsync) will occasionally produce
inconsistent files (see, e.g.,
http://oss.oetiker.ch/rrdtool/forum.en.html#nabble-td5410407 );

-- rrddump gives me even better (arch-independent) exports, but still does
*not* call rrd_lock() to ensure consistency;

-- rrdresize does the locking, but insists on making *some* change to the
RRD structure (adding or removing at least one line - easy to hack to permit
==0, though);

-- taking boilerplate "plain file copy" C code and peppering it with the
necessary fcntl()s myself would work, but also makes for a nasty surprise
*if* rrdtool should ever change its preferred file locking method(s); and

-- there's no COPY/BACKUP/EXPORT command or somesuch built into rrdcached
(yet?).

(Alas, I'm not able to add snapshot capabilities to the underlying
filesystem right away.)

Is there a preferred, or even official, method to back up RRD files so that
they won't turn out to be damaged (short of disk or filesystem failures, of
course)?

Kind regards,
J. Bern
-- 
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Locking-read-copy-backup-of-RRD-files-tp5671622p5671622.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.



More information about the rrd-users mailing list