I did some looking into the index thing and found that I had some extra indices 
on the File table that apparently were crippling performance.

These two pages led me in the right direction:

http://www.bacula.org/7.0.x-manuals/en/main/Catalog_Maintenance.html#SECTION004392000000000000000

http://wiki.bacula.org/doku.php?id=faq#restore_takes_a_long_time_to_retrieve_sql_results_from_mysql_catalog

Once I dropped the extra indices, the "Building directory tree" step took about 
1 minute (even with 3 million files, even with only 16GB RAM).

-ryan

From: Josh Fisher <jfis...@pvct.com>
Sent: Wednesday, June 13, 2018 3:59 AM
To: Ryan Butler <ryan.but...@inflexion.org>; bacula-users@lists.sourceforge.net
Subject: Re: [Bacula-users] Trying to restore, but can't


On 6/12/2018 12:35 PM, Ryan Butler wrote:
Hello all,

After a failed upgrade to one of our organization's web apps, I'm trying to 
restore the web app directory from Bacula. I went into bconsole, restore, 
option 3 (enter jobid), and have been sitting on "Building directory tree for 
JobId(s) 56810 ..." for the past 12 hours. The MySQL process is using 100% CPU 
on one core, but other than that, I have no indication that anything is 
happening. And this is something that I need to figure out why it is happening, 
but what I really need right now is to just get the web app restored so users 
don't start getting angry.

100% CPU on one core with MySQL is often due to a missing index.



I really just need to restore a single directory (and all of its files and 
subdirectories), so I've been looking at option 11 (enter a list of directories 
to restore for jobid), and it looks like I'd have to manually specify all the 
subdirectories, which is doable. However, would that option also need to "Build 
directory tree", and therefore I'd be back at the original problem?

Well, option 11 should use a different query than option 3, so if the problem 
is a missing index, then option 11 may well work better than option 3.



We're on version 7.0.5, which I know is old, and I have plans to update it 
after this disaster.

I suggest moving the catalog to postgres on SSD storage, while you're at it.



Here's the details on that particular Job:

JobFiles: 2,927,789
JobBytes: 54,769,194,913 (54 GB)

Any help is appreciated!!!

Ryan Butler
Systems Administrator

[/Users/ryan_butler/Library/Containers/com.microsoft.Outlook/Data/Library/Caches/Signatures/signature_1633926894]<https://www.inflexion.org/>





------------------------------------------------------------------------------

Check out the vibrant tech community on one of the world's most

engaging tech sites, Slashdot.org! http://sdm.link/slashdot




_______________________________________________

Bacula-users mailing list

Bacula-users@lists.sourceforge.net<mailto:Bacula-users@lists.sourceforge.net>

https://lists.sourceforge.net/lists/listinfo/bacula-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to