Another 2.4 upgrade horror story

Bron Gondwana brong at fastmail.fm
Wed Sep 26 02:22:42 EDT 2012


On Wed, Sep 26, 2012, at 01:25 AM, Wolfgang Breyha wrote:
> On 2012-09-25 19:05, Simon Beale wrote:
> > The only gotcha I experienced was I forgot that cyrus was configured to
> > hardlink mail, which of course was no longer the case after each mailbox
> > was migrated, so my disk usage exploded. (But easily fixed/restored once
> > identified).
> 
> What did you use for restoring the hardlinks? freedup as well?
> 
> I'm asking because I found a bug in freedup causing dataloss. I already
> sent a patch fixing it to the author of freedup last november, but he
> didn't release a new version yet.

I have a script for doing it - though only within a single user...

This is the core of the link logic:

    print "fixing up files for $guid ($srcname)\n";
    foreach my $file (@others) {
      my $tmpfile = $file . "tmp";
      print "link error $tmpfile\n" unless link($srcname, $tmpfile);
      chown($uid, $gid, $tmpfile);
      chmod(0600, $tmpfile);
      print "rename error $file\n" unless rename($tmpfile, $file);
    }

I suspect your fixup is similar :)

Bron.
-- 
  Bron Gondwana
  brong at fastmail.fm



More information about the Info-cyrus mailing list