On Friday 28 October 2005 17:32, Richard Ryder wrote:
> Hi All,
>
> I recently tried to initiate a restore for someone who couldn't recall
> the exact name of the files and directories they were interested in
> restoring.
>
> The file server in question has a 2TB file system of which about 1TB is
> full.  There are a -lot- (in the millions) of tiny files on it.  That
> seems to be the cause of this problem.
>
> I used bconsole to select the desired backup to restore from.  It
> reports that when building the tree the query fails.  I ran the query in
> the mysql client and it failed with an out of memory error.  The system
> has 2G of RAM and 2G of swap.
>
> Here's a transcript of what I'm seeing.  I appreciate any help or
> advice!
>
> Thanks,
> Rich
>
>
>
> *restore
>
> First you select one or more JobIds that contain files
> to be restored. You will be presented several methods
> of specifying the JobIds. Then you will be allowed to
> select which files from those JobIds are to be restored.
>
> To select the JobIds, you have the following choices:
>    <snip>
>      6: Select backup for a client before a specified time
>    <snip>
> Select item:  (1-12): 6
> The restored files will the most current backup
> BEFORE the date you specify below.
>
> Enter date as YYYY-MM-DD HH:MM:SS :2005-10-05 00:00:00
> Defined Clients:
>      1: igsp-backup-fd
>      2: igsp-homedir-fd
>      3: igsp-admin-fd
> Select the Client (1-3): 2
> The defined FileSet resources are:
>      1: Catalog
>      2: Full Set
> Select FileSet resource (1-2): 2
> +-------+-------+------------+-------------------+---------------------+---
>----- ----+-----------+
>
> | JobId | Level | JobFiles   | JobBytes          | StartTime           |
> | VolumeN ame | StartFile |
>
> +-------+-------+------------+-------------------+---------------------+---
>----- ----+-----------+
>
> |   475 | F     | 11,010,667 | 1,010,236,712,721 | 2005-10-02 01:05:01 |
> | AZB446L 1   |       177 | 479 | I     |      9,434 |     7,594,385,033 |
> | 2005-10-03 01:05:01 | AZB423L 1   |       112 | 484 | I     |      8,373
> | |    31,099,928,671 | 2005-10-04 01:05:01 | AZB423L 1   |       124 |
>
> +-------+-------+------------+-------------------+---------------------+---
>----- ----+-----------+ You have selected the following JobIds: 475,479,484
>
> Building directory tree for JobId 475 ...  Query failed: SELECT MediaType
> FROM JobMedia,Media WHERE JobMedia.JobId=475 AND
> JobMedia.MediaId=Media.MediaId: ERR=Lost connection to MySQL server during
> query
>
> Building directory tree for JobId 479 ...
> Building directory tree for JobId 484 ...
> 3 Jobs, 15,424 files inserted into the tree.
>
> You are now entering file selection mode where you add (mark) and
> remove (unmark) files to be restored. No files are initially added, unless
> you used the "all" keyword on the command line.
> Enter "done" to leave this mode.
>
> cwd is: /
> $
>
>
> After that I ran the query manually to check the results:
>
> [EMAIL PROTECTED] mysql]# mysql -p -D bacula
> Enter password:
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 15 to server version: 4.1.15-standard
>
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
> mysql> SELECT Path.Path,Filename.Name,FileIndex,JobId,LStat FROM
> File,Filename,Path WHERE File.JobId=544 AND
> Filename.FilenameId=File.FilenameId AND Path.PathId=File.PathId; mysql: Out
> of memory (Needed 3616652 bytes)
> ERROR 2008 (HY000): MySQL client ran out of memory

Bacula takes a lot of pains to not consume undue amounts of memory during the 
restore process.  Unfortunately, we cannot control what MySQL does.  You 
might look into modifying the MySQL configuration file, where they permit you 
some control over the memory usage of the server.  You could also increase 
the size of your swap file.

Since the message specifically mentions the client, which means the MySQL 
libraries that Bacula uses, there may be some way to optimize or tune it, but 
I am not aware of how.

-- 
Best regards,

Kern

  (">
  /\
  V_V


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to