Bacula-users

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

2009-06-02 09:03:55
Subject: Re: [Bacula-users] Is it possible to send a pragma sql command to sqlite
From: Johan van Vliet <baculaml AT itmon DOT nl>
To: Arno Lehmann <al AT its-lehmann DOT de>
Date: Tue, 02 Jun 2009 14:19:46 +0200
Hi,

Excellent! The sqlquery command followed by the PRAGMA "query" did the 
trick. I was now able to create full backups of my systems again. 

Martin en Arno thank you both very much for you help!

Regards,
J.

Arno Lehmann writes:

> 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

------------------------------------------------------------------------------
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>