Re: [Bacula-users] sqlite to postgres|maridb migration -- how to confirm success?

2020-12-30 Thread Ken Johnson
For the benefit of anyone who reads this thread later, see dbcheck, provided
as part of bacula.

Ken
 
 

-Original Message-
From: Ken Johnson [mailto:kjohn...@eclypse.org] 
Sent: Tuesday, December 22, 2020 6:04 PM
To: bacula-users@lists.sourceforge.net
Subject: [Bacula-users] sqlite to postgres|maridb migration -- how to
confirm success?

Hello,

I am facing the sqlite to postgres or mariadb (mysql) migration of the
Bacula database.  The current db file is about 5GB, after a vacuum.  Right
now I think I will choose the one with the best migration tools I can get
for it.  Otherwise, I do not know of a reason to care.  I have done more
admin on mariadb, I have done more coding (not that much) using postgres.
On the server in question; both postgres and mariadb are already installed.

I am aware of the two scripts from 2006 in examples/database/ in the source
distribution.

I have just under 50 media in the database, with 10 stored offsite; bscan is
not a usable option for me.


Here is my question:  when I think the conversion is complete, what is the
best reasonable method to confirm the success of the conversion?


Thank you and best regards,

Ken










___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users



___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bacula-sd - file driver - cloud resource

2020-12-30 Thread Žiga Žvan

Thanks Heitor,

I have changed configuration back to normal volumes (write to file and 
not to folders with fileparts). I have limited max jobs parameter to 1.


I'm still puzzled with volume reuse:
a) I have limited maximum volumes to 6 on my clients weekly pool (dc1)
b) The label command was triggered a month ago (I'm not sure why). At 
that time I have created another volume (dc1_weekly).
c) Today I'm trying to create a full backup to weekly pool but I'm again 
getting error: "Cannot find any appendable volumes."
d) Label command works fine on other pools (I can create backup of dc1 
client in monthly pool, but there is no problem with maximum volumes limit)
e) I have simulated this on another client (jhost05)  with the same 
configuration. It has created 7th volume (not sure why - I have limited 
max volume to 6). At next backup it triggered label command (not sure 
why - I expect that mediaid 475 is suitable to write to)


I have attached relevant part of configuration bellow.

Any idea why this is happening? What should I do to force bacula to 
reuse my volumes?
Should I do something with existing volumes now that I have changed them 
back to files instead of folders (probably it changed voltype from 14 to 1)?


Kind regards and happy new year. :)
Ziga

*list volume pool=dc1-weekly-pool
+-+-+---+-++--+--+-+--+---+---+-+--+-+---+
| mediaid | volumename  | volstatus | enabled | volbytes   | 
volfiles | volretention | recycle | slot | inchanger | mediatype | 
voltype | volparts | lastwritten | expiresin |

+-+-+---+-++--+--+-+--+---+---+-+--+-+---+
| 284 | dc1-weekly-vol-0284 | Purged    |   1 | 91,477,448,939 
|   21 |    3,024,000 |   1 |    0 | 0 | File1 
|  14 |   94 | 2020-11-11 11:23:40 | 0 |
| 289 | dc1-weekly-vol-0289 | Append    |   1 | 49,639,547,675 
|   11 |    3,024,000 |   1 |    0 | 0 | File  
|   1 |    0 | 2020-10-01 11:05:10 | 0 |
| 312 | dc1-weekly-vol-0312 | Purged    |   1 | 14,998,326,906 
|    3 |    3,024,000 |   1 |    0 | 0 | File1 
|  14 |   16 | 2020-11-21 04:50:00 | 0 |
| 319 | dc1-weekly-vol-0319 | Used  |   1 | 77,232,998,541 
|   17 |    3,024,000 |   1 |    0 | 0 | File1 
|  14 |   79 | 2020-11-28 07:08:39 |   244,150 |
| 354 | dc1-weekly-vol-0354 | Recycle   |   1 |  1 
|    0 |    3,024,000 |   1 |    0 | 0 | File1 
|  14 |    0 | 2020-10-24 15:26:07 | 0 |
| 385 | dc1-weekly-vol-0385 | Purged    |   1 | 10,999,742,528 
|    2 |    3,024,000 |   1 |    0 | 0 | File1 
|  14 |   12 | 2020-10-31 05:28:03 | 0 |
| 430 | dc1_weekly  | Purged    |   1 | 18,458,421,588 
|    4 |    3,024,000 |   1 |    0 | 0 | File1 
|  14 |   20 | 2020-11-14 07:36:56 | 0 |

+-+-+---+-++--+--+-+--+---+---+-+--+-+---+

*list volume pool=jhost05-weekly-pool

+-+-+---+-+---+--+--+-+--+---+---+-+--+-+---+
| mediaid | volumename  | volstatus | enabled | 
volbytes  | volfiles | volretention | recycle | slot | inchanger | 
mediatype | voltype | volparts | lastwritten | expiresin |

+-+-+---+-+---+--+--+-+--+---+---+-+--+-+---+
| 475 | jhost05-weekly-vol-0475 | Purged    |   1 | 
2,293,497,625 |    0 |    3,024,000 |   1 |    0 | 0 | File1 
|  14 |    4 | 2020-11-20 23:37:22 | 0 |
| 504 | jhost05-weekly-vol-0504 | Used  |   1 | 
2,293,497,625 |    0 |    3,024,000 |   1 |    0 | 0 | File1 
|  14 |    4 | 2020-11-28 02:05:21 | 219,916 |
| 603 | jhost05-weekly-vol-0603 | Used  |   1 | 
2,293,497,625 |    0 |    3,024,000 |   1 |    0 | 0 | File1 
|  14 |    4 | 2020-12-11 23:09:53 | 1,418,988 |
| 616 | jhost05-weekly-vol-0616 | Used  |   1 | 
2,293,497,625 |    0 |    3,024,000 |   1 |    0 | 0 | File1 
|  14 |    4 | 2020-12-18 23:14:21 | 2,024,056 |
| 628 | jhost05-weekly-vol-0628 | Append    |   1 | 
2,293,497,625 |    0 |    3,024,000 |   1 |    0 | 0 |