I recently banged my head against the desk repeatedly when trying to clone a site between spokes. I kept getting an error message saying that the tar.gz (from the backups directory) could not be extracted.
Running: gunzip -c /var/aegir/backups/sitename-stamp.tar.gz | tar pxf - in /var/aegir/platforms/platformname/sites/sitename
Failed to extract the contents of /var/aegir/platforms/platformname/sites/sitename to @target (The file could not be extracted)
I'm thinking this message isn't terribly helpful! :)
Naturally I jumped to "permissions" as the culprit, and spent way too much time checking and double-checking all of the relevant permissions, before a colleague asked if there was enough diskspace on the spoke. It turned out that in fact I was running out of diskspace for my backups on the hub, and the tar.gz was being written, but incompletely. Once I freed up some space for the backups, I got a proper backup.tar.gz file from the clone process, and everything went smoothly.
A simple explanatory error message would have made this much easier to deal with, but also it seems like the clone/migrate should fail earlier than it does. Rather than waiting to try to extract the backup, could there be a quick integrity check when the file is created in the first place?
Looking forward to discussing this, thanks.
Comments
Comment #1
anarcat CreditAttribution: anarcat commentedTwo things here: either (A) tar doesn't give out a useful error or (B) we don't pass it upwards. I would say we can fix (B) but not (A).
Comment #2
ergonlogicNew features need to be implemented in Aegir 3.x, then we can consider back-porting to Aegir 2.x. Aegir 1.x is essentially deprecated.
Comment #3
ergonlogicIt'd be nice to check/estimate the size of the db and and site dir, as well as the available space on the target, so that we can bail with an error.