I'm creating backups from our Bugzilla for a while, but I guess I do
something wrong :-)
My problem is that we have 800+ bugs recently, many with attachments,
most of them have archived files attached with size of X megabytes, but
the whole backup I create is no more than 6 megabyte... That's strange
because one of the attachments is a 50M zip :-)
Our Bugzilla is a pretty ancient one, with version 2.16.7.
My backup script is something like this
echo "Dumping Bugzilla database..."
mysqldump -umysqldumper -p12345 --database bugzilla > $BUGZILLA_DUMP
echo "Creating acrhive from Bugzilla config files..."
tar -czf $TARGET_DIR/$FNAME /var/lib/bugzilla/data \
$BUGZILLA_DUMP
I cannot figure out where does the Bugzilla store the attached files,
could anybody please help me out? I found some sort of binary data in
the database (in db "bugzilla" table "attachments" column "thedata"),
but the dump is too little for me...
Any suggestions would be greatly appreciated!
Richard
Then run tar -tzvf $TARGET_DIR/$FNAME
Make sure everything within the tar looks correct. Attachments can be in data/attachments or in the attachments table for 2.20+, but I don't know about 2.16. If you have "Big Files" checkbox when creating an attachment, then it could be in data/attachments.
Also, mysqldump usually does not need a --database parameter.
mysqldump bugzilla -umysqldumper -p12345
should be all you need. You could specify particular tables if you find they aren't being extracted.
mysqldump bugzilla attachments bugs <other table> -umysqldumper -p12345
Hi everyone!
_______________________________________________
support-bugzilla mailing list
support-...@lists.mozilla.org
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put support-...@lists.mozilla.org in the To: field when you reply.
The result of du is:
# du -skh /var/lib/bugzilla/data/
5.9M /var/lib/bugzilla/data/
Yes, I've already checked the created archive, everything is in it what
I want to archive.
I've also tried your version for mysqldumb, but the result is seemingly
the same :-(
Richard
mysql> SELECT bug_id,attach_id,CONCAT(LENGTH(thedata)/1048576," MB") AS
size FROM attachments WHERE LENGTH(thedata) > 1048576;
The result was an empty set :-)
So these attachments are not stored directly in the database, then the
question is where are they? We can download these attachments from the
bugzilla, so they have to be somewhere there but I cannot locate the
necessary files.
Richard
Tosh, Michael J wrote:
> Have you verified that the entire zip was uploaded? Apache usually has an upload limit of a few MB. You can do a:
> SELECT bug_id,attach_id,CONCAT(LENGTH(thedata)/1048576," MB") AS size FROM attach_data LEFT OUTER JOIN attachments ON attach_id=attach_data.id WHERE LENGTH(thedata) > 1048576;
> to make sure you see something greater than 50MB.
>
> -----Original Message-----
> From: Legéndi Richárd Olivér [mailto:roa...@freemail.hu]
> Sent: Tuesday, December 18, 2007 10:07 AM
> To: Tosh, Michael J
> Subject: Re: Creating a Bugzilla backup
>
> No, the ouput files are ok.
>
> I'm suspicious because these files are extremely small. I know we have a
> 50M zip attached in one of the bugs, and the whole mysqldump and other
> archived directories are less than 10M ... I must forget to include
> something.
That may help I hope. Find also has a way to look for files over a certain size, but I don't remember exactly at this time. Maybe if you download the attachment and get the exact size in bytes of the zip, then do a (find / -type f -size <size in bytes>) you will see where it is stored.
Richard
2007/12/18, Legéndi Richárd Olivér <roa...@freemail.hu>:
> I'm creating backups from our Bugzilla for a while, but I guess I do
> something wrong :-)
>
> My problem is that we have 800+ bugs recently, many with attachments,
> most of them have archived files attached with size of X megabytes, but
> the whole backup I create is no more than 6 megabyte... That's strange
> because one of the attachments is a 50M zip :-)
from the recent discussion, I can't tell what's wrong here either.
Maybe you want to try your backup on an otherwise pristine install?
Perhaps this will shed some light on your situation.
Regards
Marc
Are you sure that the "mysqldumper" user has rights to dump
that whole DB?
Attachments are stored in the database, in Bugzilla 2.16,
unless you have customized your Bugzilla to do something else with them.
-Max
--
http://www.everythingsolved.com/
Competent, Friendly Bugzilla and Perl Services. Everything Else, too.