On Thu, Jan 31, 2013 at 06:00:58PM -0500, Dan Langille wrote:
> On Jan 31, 2013, at 7:58 AM, Uwe Schuerkamp wrote:
>
> > Hello list,
> >
> > is it possible to delete several bacula volumes in one go, say like
> > so:
> >
> > delete catalog=MyCatalog volume=v01 volume=vol2 ... yes ?
>
> Script it.
>
> echo 'catalog=MyCatalog volume=v01 yes' | console
>
Hey Dan,
thanks for your reply, I'm aware of the above scripting possibility,
my question was aiming at the possibility of deleting several volumes
*at once* in one "delete" command.
> I'm assuming you know how to get a list of those volumes into a script…
>
> > I have several volumes with sizes in the hundreds of gigabytes and I
> > assume that deleting them or rather their corresponding file table
> > entries in one fell swoop (single delete from sql statement) would be
> > faster then deleting them one by one (which takes several hours per
> > volume on a 200GB file table with nearly one billion rows).
>
> Why does it take several hours per volumes to delete a volume? You're just
> acting on the Catalog.
>
> Oh yes, deleting all the file and job references. Well, perhaps we need to
> look at that took
>
> The database is lacking in referential integrity. I wish it wasn't. By
> rights, you should be able to go in
> and delete from the media table, and have everything be safe and sound. i.e.
> no orphans. But that's not
> the case, last time I checked.
>
> So.. yeah, be cautious there. Sooner or later, you're going to have to let
> those records get deleted.
>
Yep, I also note that the mysql db size isn't reduced after deleting a
volume. I'm currently testing an "optimize table File" on a spare box
with 8gb RAM and 6-spindle raid5 volume, but the optimize statement
hasn't completed yet (started it last night around 10pm ;-)
Some stats:
# uptime
12:07:23 up 13 days, 19:57, 2 users, load average: 1.00, 1.01, 1.02
# free
total used free shared buffers
cached
Mem: 8176260 8132176 44084 0 78484
7447564
-/+ buffers/cache: 606128 7570132
Swap: 10223608 144 10223464
# mystat
Id User Host db Command Time State Info
Progress
5 root localhost bacula Query 52857 Repair by
sorting optimize table File 0.000
13 root localhost NULL Query 0 NULL show
full processlist 0.000
Variable_name Value
Com_assign_to_keycache 0
Com_preload_keys 0
Com_show_keys 0
Handler_mrr_key_refills 0
Handler_read_key 0
Key_blocks_not_flushed 0
Key_blocks_unused 870519
Key_blocks_used 0
Key_blocks_warm 0
Key_read_requests 0
Key_reads 0
Key_write_requests 0
Key_writes 0
Server version: 5.5.27-MariaDB MariaDB Server, CentOS 6 64bit
MariaDB is eating about 1,6GB of RAM atm. Any settings I could optimize
to speed up the optimize process or should I leave as much memory for
fs caching as possible?
Cheers, Uwe
--
NIONEX --- Ein Unternehmen der Bertelsmann SE & Co. KGaA
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|