Bacula-users

Re: [Bacula-users] Is it possible to send a pragma sql command to sqlite

2009-06-02 03:36:26
Subject: Re: [Bacula-users] Is it possible to send a pragma sql command to sqlite
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 02 Jun 2009 09:30:49 +0200
Hello,

02.06.2009 07:59, Johan van Vliet wrote:
> Hi all,
> 
> With help from this list I discovered that a temporary SQLite3 file is 
> filling up my root file system. For incrementals and differentials this is 
> not a problem. Full backups, however, fail because the / (root) fills to 
> 100%.
> 
> I've created the largest possible root for my setup (= flashboot/ramdrive)
> 
> I discovered that Sqlite3 supports a statement that will allow you to direct 
> the temp file to an other directory (where I have plenty of space) using the 
> statement:
> 
> PRAGMA temp_store_directory = 'directory-name';
> 
> Is there anyway I can configure this from bacula or do I need to manually 
> patch the director and recompile? And If I need to patch is myself is it 
> sufficient to patch only "sql_create.c"?

Try the following:
Use bconsole to execute an SQL query and issue the command you need:
sqlquery
PRAGMA temp_store_directory = 'directory-name';

^^
This is a blank line to leave SQL query mode

Run a full job, or check somehow if the command was successfull.

If that works, I'd simply modify my start scripts to execute something 
like
echo 'sqlquery
PRAGMA temp_store_directory = 'directory-name';

' | bconsole -c ...
a few seconds after the DIR starts up.

Alternatively, you could set up an admin job to set this, scheduled to 
run every hour or so - I assume setting this more often than strictly 
necessary won't hurt.

Arno

> Best regards,
> J.
> 
> 
> 
> 
>>  15007 bacula-dir GIO   fd 15 wrote 1024 bytes
>>        "SQLite format 3 
>> ........................................................................... 
>> ...........CREATE TABLE batch (FileIndex integer,J\
>>         obId integer,Path blob,Name blob,LStat tinyblob,MD5 tinyblob)"
>>
> ...
>> Based on the file "cats/sql_create.c" (my_batch_start) in the bacula source 
>> I would guess it is a "temporary database". 
> 
> 
> 
> -----------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
> looking to deploy the next generation of Solaris that includes the latest 
> innovations from Sun and the OpenSource community. Download a copy and 
> enjoy capabilities such as Networking, Storage and Virtualization. 
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 

-- 
Arno Lehmann
IT-Service Lehmann
Sandstr. 6, 49080 Osnabrück
www.its-lehmann.de

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>