Re: [Bacula-users] Wildfile

2024-04-10 Thread Bill Arlofski via Bacula-users

On 4/10/24 11:38 PM, Stefan G. Weichinger wrote:


First coffee here right now ;-)
Thanks for your example.


Hello Stefan,

You are welcome!

Well, it is 23:41 here now, so I have switched from coffee to beer. :)



I didn't add "signature" but already came up with this yesterday:

Fileset {
Name = "VM_XYZ"
Include {
  File = "/mnt/backup/vmbackup/Backup XYZ"
  Options {
WildFile = "*.vbk"
  }
  Options {
Exclude = "Yes"
RegexFile = ".*"
  }
}
}

seems to work!


OH! Look at you, jumping from WildFile to RegexFile!  :)

I was trying to keep things simple, but OK. :)

Yes, this is fine. Remember my first post about there always being several ways 
to do something in Bacula? :)



Do I have to add that signature-line?


To confirm why I made that comment, try running a restore of one of these jobs 
that you have now backed up. ;)

What do you see?


Glad y
ou got this working!

And, if you like we can talk about Client side scripts to point your `File = ` at too. Just for more fun and practice, of 
course. BUT... client side scripts are a bit less scalable as you might imagine. :)



Best regards,
Bill

--
Bill Arlofski
w...@protonmail.com



signature.asc
Description: OpenPGP digital signature
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Bacula and german special chars "umlauts"

2024-04-10 Thread Stefan G. Weichinger



I think those special chars are already in the filesystem like this.

It's no big deal as long as they are in the backups ;-)

Choosing files in the GUI is still possible, it just looks ugly or 
incorrect somehow.


I will check if that relates to the way samba was set up there etc (the 
relevant files are hosted by Samba)



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


Re: [Bacula-users] Wildfile

2024-04-10 Thread Stefan G. Weichinger

Am 10.04.24 um 16:45 schrieb Bill Arlofski via Bacula-users:

Hello Stefan,

No, this will not backup anything because you have not specified 
anything to backup with a `File = /path/to/somewhere` inside of your 
`Include{}` block. So far, you have only set something (WildFile) inside 
of an `Option{}` block.


There are several ways to do what you want (there always is with Bacula :)

The first, based on your current Fileset template will require a `File 
=` line as mentioned above and also another `Options{}` block to exclude 
everything else:

8<
Fileset {
    Name = "VM_xxx-y"
    Include {
  # This option block matches your *.vbk files and creates a 
signature in the catalog for backed up files

  Options {
    signature = sha1   # You need a 
signature, so I added this
    WildFile = "/mnt/backup/vmbackup/*.vbk"    # Note, I fixed your 
extra quotes and a backslash and simplified here

  }

  # This options block says to exclude everything else, not matched 
above

  Options {
    WildFile = "*.*"
    Exclude = yes
  }

  File = "/mnt/backup/vmbackup"  # And finally, what 'top level' 
directory are we considering for backups

    }
}
8<

This "Should work"™  I have not tested it, and wrote it quickly in my 
email client before finishing my first cup of coffee this morning. :)


First coffee here right now ;-)
Thanks for your example.

I didn't add "signature" but already came up with this yesterday:

Fileset {
  Name = "VM_XYZ"
  Include {
File = "/mnt/backup/vmbackup/Backup XYZ"
Options {
  WildFile = "*.vbk"
}
Options {
  Exclude = "Yes"
  RegexFile = ".*"
}
  }
}

seems to work!

Do I have to add that signature-line?

Remember, when you have re-configured this Fileset and have issued a 
`reload` command in bconsole, instead or running the job, you can 
quickly see if your settings do what you want with an `estimate` command 
like:


* estimate listing job=

This way you don't have a bunch of failed jobs in your catalog. :)


Ah, good, that's a nice learning, thanks!

P.S. I see your files (or directories, I am not 100% sure which) have 
spaces in their names.  I would recommend doing yourself a favor and not 
using spaces if you can help it. It will make your life easier and save 
you from needing to "escape" spaces with backslashes, etc.


I totally agree, but it's not fully in my hand.

The Veeam--backups are done by another admin there .. I will talk to him 
to use better naming and also generalizing the directory names.


I am proceeding with editing and testing all my Filesets and Jobs now.

Have a great day,
Stafen



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


Re: [Bacula-users] Backup in disk AND tape

2024-04-10 Thread Chris Wilkinson
I have this working now. The script is below, as per Bill's script with an
extention. It is called from a Runscript as "Command =
/full-path/run-copy-job.sh copy-job-name". There is a copy job defined for
each backup job. The $1 parameter passes the copy job name to the script.

#!/bin/bash
#usage run-copy-job.sh job-name
# Pipe the run command to bconsole
# 
echo "run yes job=$1" | bconsole

This all works fine. The disadvantage is that the copy job hard codes the
level to be copied so the same copy job (in my case full) runs irrespective
of the job being incr/diff/full. For "selection type=PoolUncopiedJobs" this
is only a minor issue since already copied jobs are skipped.

Chris

On Tue, 9 Apr 2024, 15:12 Bill Arlofski,  wrote:

> On 4/9/24 6:53 AM, Chris Wilkinson wrote:
> > Regarding the suggestion to put a Runafter block in the job to run the
> copy job at the end, that doesn't seem to be allowed.
> > Run job=xx commands are not permitted in a Runscript as I just found
> out. It gives a not allowed command error.
> >
> > Perhaps there is another way to accomplish this?
> >
>
> Hello Chris,
>
> Yes, convert that run command to a simple script like:
>
> /opt/bacula/script/run_catalog-copy.sh:
> 8<
> #!/bin/bash
>
> # Pipe the run command to bconsole
> # 
> echo "run yes job=catalog-copy" | bconsole
> 8<
>
> Now, that is the most basic it needs to be, but you can add other things
> to it. ie: error checking, command line options,
> etc. Although in your use case it does not seem necessary to complicate
> things. :)
>
>
> Then, just replace the
> 8<
> Console = "run job=catalog-copy yes"
> 8<
>
> ...line in your RunScript with:
>
> 8<
> `Command = /opt/bacula/script/ru
> n_catalog-copy.sh`
> 8<
>
> And you should be OK.
>
> Make sure your `catalog-copy` job has the same Priority (11) as your
> Catalog job, otherwise you will end up in a dead-lock
> where the Copy job waits for the Catalog job to finish, and the Copy job
> is waiting for the catalog-copy job (which will
> never start) to finish.
>
>
> Hope this helps,
> Bill
>
> --
> Bill Arlofski
> w...@protonmail.com
>
>
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] [Bacularis/Baculum] Restore with web doesn't create job before 1 hour

2024-04-10 Thread Marcin Haba
Hello Timothé,

On Wed, 10 Apr 2024 at 17:29, timothe pennec  wrote:

> Thank you i will test this workaround.
>
> Maybe migrating to PostreSQL will correct this issue if i understood ?
>


For sure it is a good choice for Bacula.

Best regards,
Marcin Haba (gani)


>
> Best regards,
> Timothé
>
> --
> *De :* Marcin Haba 
> *Envoyé :* mercredi 10 avril 2024 07:32
> *À :* timothe pennec ;
> Bacula-users@lists.sourceforge.net 
> *Objet :* Re: [Bacula-users] [Bacularis/Baculum] Restore with web doesn't
> create job before 1 hour
>
> Hello Timothé,
>
> I did some tests and analysis for this hanging restore command error. It
> looks that the Bacula Bvfs restore part responsible for hardlinks causes
> it. This change came to Bacula in version 11.0.
>
> Looking at this hardlinks part, as a workaround I created an index in the
> catalog that solved this hanging:
>
> CREATE INDEX file_jobid_fileindex_idx ON File (JobId, FileIndex);
>
> Creating this index can take some time specially if you have many files in
> the File table, but later the restore starts without waiting.
>
> Creating index is not a solution, better if the hardlinks part could be
> optimized if possible. For now I don't have any other option for that.
>
> For these hardlinks, in Bacula it is a common part for MySQL/MariaDB and
> PostgreSQL, but with MySQL this problem is much better visible.
>
> Best regards,
> Marcin Haba (gani)
>
> On Sat, 6 Apr 2024 at 18:55, Marcin Haba  wrote:
>
> Hello Timothé,
>
> Thanks for providing all details about this restore problem.
>
> I did tests on a set of 150K files with old Bacula 9.0.6 and the latest
> 15.0.2. It looks that something has changed in Bacula MySQL/MariaDB support
> in a version between because on the version 9 it works well, while on 15 it
> hangs on the restore commands.
>
> Your restore using bconsole can work much better because it does not use
> Bacula Bvfs interface.
>
> I will try to look at it deeper in the next few days. I will let know if I
> find something.
>
> Best regards,
> Marcin Haba (gani)
>
> On Thu, 4 Apr 2024 at 16:14, timothe pennec  wrote:
>
> Hi,
>
> I'm using mariadb for database and it's him seems to be slow :
> top result :
>
> top - 16:08:51 up 2 days, 20:10,  6 users,  load average: 0,97, 0,60, 0,29
> Tasks: 307 total,   1 running, 306 sleeping,   0 stopped,   0 zombie
> %Cpu(s): 12,5 us,  0,0 sy,  0,0 ni, 87,3 id,  0,0 wa,  0,0 hi,  0,2 si,
>  0,0 st
> MiB Mem :   7936,5 total,177,7 free,592,8 used,   7166,1 buff/cache
> MiB Swap:   4096,0 total,   4095,0 free,  1,0 used.   7026,5 avail Mem
> PID USER  PR  NIVIRTRESSHR S  %CPU  %MEM TIME+ COMMAND
>   29267 mysql 20   0 1346196 142604  23396 S 100,0   1,8   2:53.58
> mariadbd
>
> I've 8 vCPU but only one is at 100 % (can see it with htop) all other at 0.
>
> I've enabled debug level 500 and i can see many log right after submit
> button "Run" and stuck at :
>
> bacula-dir: ua_restore.c:2015-0 JobId=4792 JobIds= FileIndex=10
> [All 53000 files ...]
> bacula-dir: ua_restore.c:2015-0 JobId=4792 JobIds= FileIndex=53895
> bacula-dir: ua_restore.c:2015-0 JobId=4792 JobIds= FileIndex=53896
> bacula-dir: mysql.c:584-0 db_sql_query finished
> bacula-dir: ua_restore.c:1476-0 query=SELECT Path.Path, File.Filename FROM
> File JOIN Path USING (PathId) JOIN b210091 AS T ON (File.JobId = T.JobId
> AND File.FileIndex = T.FileIndex) WHERE File.Filename LIKE
> ':component_info_%' AND File.JobId IN (4792)
> bacula-dir: mysql.c:527-0 db_sql_query starts with SELECT Path.Path,
> File.Filename FROM File JOIN Path USING (PathId) JOIN b210091 AS T ON
> (File.JobId = T.JobId AND File.FileIndex = T.FileIndex) WHERE File.Filename
> LIKE ':component_info_%' AND File.JobId IN (4792)
>
>
> Any idea ?
>
> Thank you
> Timothé
>
> --
> *De :* Marcin Haba 
> *Envoyé :* mercredi 3 avril 2024 21:53
> *À :* timothe pennec 
> *Cc :* bacula-users@lists.sourceforge.net <
> bacula-users@lists.sourceforge.net>
> *Objet :* Re: [Bacula-users] [Bacularis/Baculum] Restore with web doesn't
> create job before 1 hour
>
> Hello Timothé,
>
> Thanks for your detailed description of the problem.
>
> For start I would propose to check what is going inside Bacula and the
> Catalog when this restore is trying to start.
>
> Yes, observing 'ps aux' is a good idea, that you did. Also useful can be
> 'top' command with watching what process takes the most resources.
>
> From the Bacula side you can set debug for Director by this bconsole
> command:
>
> setdebug level=500 tags=bvfs,sql trace=1 dir
>
> in the Bacula Director working directory you will see the
> youdirector-dir.trace file where this debug lines will be written.
>
> If your Catalog database is PostgreSQL you ran run in the time of the
> restore hanging this SQL query to see currently pending SQL queries:
>
> SELECT * FROM pg_stat_activity;
>
> Please let us know about the results.
>
> Good luck.
>
> Best regards,
> Marcin 

Re: [Bacula-users] baculum + bacula 13.0.4 slow web interface

2024-04-10 Thread Marcin Haba
Hello Unkdef,

Thanks for your feedback.

I would propose to do a test. Could you please go to the application
settings page (the gear wheel icon on the top left side), there please go
to the 'Display options' tab and in an option with label "Job age on the
dashboard job graphs" could you put a value for example 7 days or 3 days?
Once you save it, please check and let us know if loading the dashboard is
faster.

Did you try to tune the database using mysqltuner?

Best regards,
Marcin Haba (gani)

On Wed, 10 Apr 2024 at 10:30, Unkdef unkdef  wrote:

> Please help problem not solved. when i renew page i dont see backups... i
> need to wait 10-20 sec before it appears
>
> вс, 7 апр. 2024 г. в 15:33, Marcin Haba :
>
>> Hello Unkdef,
>>
>> Yes, it does. As Rob mentioned, Bacularis is based on Baculum that
>> supports Russian translations too. The translations are there thanks to
>> Sergey Zhidkov who prepared them.
>>
>> Best regards,
>> Marcin Haba (gani)
>>
>> On Sun, 7 Apr 2024 at 10:50, Unkdef unkdef 
>> wrote:
>>
>>>
>>> ok i try bacularis
>>> does bacularis support russian language interface?
>>>
>>> Rob Gerber  7 апреля 2024 г. 01:24:27 написал:
>>>
 Unkdef, one important thing to know is that Bacularis is a friendly
 fork of baculum. It's very similar, and Marcin has been actively
 maintaining it. Marcin is also a baculum developer.

 Basically, Bacularis is the better, more optimized tool.

 This doesn't mean that the source of your problem is certainly baculum,
 but trying the actively maintained and more optimized tool Bacularis is
 certainly a good first step. :)

 Bacularis is available in docker containers if you want to simply load
 a container and give it a try. It is naturally available for bare metal
 installations as well.

 Https://bacularis.app

 Robert Gerber
 402-237-8692
 r...@craeon.net



-- 

"Greater love hath no man than this, that a man lay down his life for
his friends." Jesus Christ

"Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
za przyjaciół swoich." Jezus Chrystus
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Install.sh error trying to install manually Bacularis

2024-04-10 Thread Marcin Haba
Hello Neil,

Yes, I think that your assumption about PATH can be correct. It looks that
the /usr/local/bin path is not accessible for executing by PHP exec().

If you want you can add at the beginning of the mtx-changer script

echo $PATH

to see where exactly mtx-changer looks for binaries when it is executed via
web.

I found that FreeBSD users report this problem with PATH too:

https://forums.freebsd.org/threads/heads-up-php-exec-does-not-look-in-usr-local-bin-for-executables.78098/

Fortunately it is not difficult to solve. You can fix the PATH in
mtx-changer script or globally if it is possible.

Best regards,
Marcin Haba (gani)

On Wed, 10 Apr 2024 at 18:33, Neil Balchin  wrote:

> When trying to configure the auto changer in the API panel,  I click.
> Checkbox on get sudo configuration and when I test I get this error in red:
>
>/usr/local/share/bacula/mtx-changer: mtx: not found
> /usr/local/share/bacula/mtx-changer: perl: not found
>
>
> Both mtx and perl are installed in the system ,  perhaps there’s a path
> issue in the MTX changer script ?
>
>
> On 9 Apr 2024, at 20:56, Marcin Haba  wrote:
>
> Hello Neil,
>
> For running everything in FreeBSD Jail, if to use mtx-changer by bacula
> user is needed sudo, I think the sudo needs to be added to ChangerCommand
> too:
>
> Autochanger {
>   Name = "TL2000"
>   Device = "HH-LTO7"
>   ChangerDevice = "/dev/pass1"
>   ChangerCommand = "sudo /etc/bacula/scripts/mtx-changer %c %o %S %a %d"
> }
>
> For Perl, it is used by mtx-changer script. I see in mtx-changer that the
> Perl command can be changed to commented by default awk/sed/cut commands.
> Inside mtx-changer after the Perl command is this comment:
>
> # If perl isn't installed, you can use by those commands
>
> Best regards,
> Marcin Haba (gani)
>
> On Wed, 10 Apr 2024 at 01:44, Neil Balchin  wrote:
>
>> So I’m doing all of this from within a Freebsd Jail inside of Trueness.
>>
>> Therefore although I can expose the /dev devices I can’t easily change
>> their rwx properties so instead I added some lines to my sudoers config
>> file that allows the www and bacula users to perform certain sudo functions
>> without a password.
>>
>>
>> I added a sudo in front of my max-changer config in my bacula-sd.conf,
>>  by my theory this should be just fine
>>
>> I tested this command:
>> root@Bacula1:~ # sudo -u bacula sudo /usr/local/share/bacula/mtx-changer
>> /dev/pass1 slots
>> 24
>> root@Bacula1:~ #
>>
>> And as you can see I get the expected count of 24 slots
>>
>> Unfortunately from console:  I get
>>
>> *update slots
>> Automatically selected Catalog: MyCatalog
>> Using Catalog "MyCatalog"
>> The defined Storage resources are:
>>  1: File1
>>  2: File2
>>  3: HH-LTO7
>>  4: TL2000
>> Select Storage resource (1-4): 4
>> Connecting to Storage daemon TL2000 at localhost:9103 ...
>> 3306 Issuing autochanger "slots" command.
>> Device "TL2000" has 0 slots.
>> No slots in changer to scan.
>> *
>>
>> Now when I try to add the Autochanger TL2000 in the API I get an error
>> that it can’t find perl,  Is perl a preqequisite to bacula and I missed
>> that ?
>>
>>
>>
>>
>>
>> On 9 Apr 2024, at 14:39, Marcin Haba  wrote:
>>
>> Hello Neil,
>>
>> From your description it looks that Bacularis works with the mtx-changer
>> script well.
>>
>> For labeling volumes, as it is action realized by Bacula SD, so I think,
>> it might be good to check if the mtx-changer script is capable of being
>> correctly executed by the bacula user.
>>
>> For test I would propose to try this command:
>>
>> # sudo -u bacula /etc/bacula/scripts/mtx-changer /dev/pass1 slots
>>
>> and also a good test could be trying to label a sample volume using
>> bconsole.
>>
>> Best regards,
>> Marcin Haba (gani)
>>
>> On Tue, 9 Apr 2024 at 20:30, Rob Gerber  wrote:
>>
>>> What happens when you click 'update slots' on the volumes page, and tell
>>> it to update slots 1-24? Idk if this is relevant, but perhaps it is. Should
>>> update bacula's knowledge of what is in the library, as per mtx. The output
>>> once you click that button and tell it to update slots 1-24 should show
>>> that it knew about every tape's position in various slots in the library.
>>> If it says anything about updating a record to reflect a tape being in a
>>> certain slot, then its knowledge was incorrect and has been corrected.
>>>
>>> Robert Gerber
>>> 402-237-8692
>>> r...@craeon.net
>>>
>>> On Tue, Apr 9, 2024, 1:14 PM Neil Balchin  wrote:
>>>
 Ok Great,  that solves that problem

 I’m almost there

 I’m using a Dell TL2000 Tape library and a HH LTO7 drive

 I’ve added these to my bacula-sd ( configs pasted below). Also added
 the Autochanger and Drives to the API device list

 From the API gui. It’s clearly running the slots and status commands
 properly. Because it shows the 19 tapes with barcodes ,  however when I try
 to label these tapes from the volumes page it reports Zero slots

 Autochanger {

Re: [Bacula-users] Install.sh error trying to install manually Bacularis

2024-04-10 Thread Neil Balchin
When trying to configure the auto changer in the API panel,  I click. Checkbox 
on get sudo configuration and when I test I get this error in red:

   /usr/local/share/bacula/mtx-changer: mtx: not found 
/usr/local/share/bacula/mtx-changer: perl: not found


Both mtx and perl are installed in the system ,  perhaps there’s a path issue 
in the MTX changer script ?


> On 9 Apr 2024, at 20:56, Marcin Haba  wrote:
> 
> Hello Neil,
> 
> For running everything in FreeBSD Jail, if to use mtx-changer by bacula user 
> is needed sudo, I think the sudo needs to be added to ChangerCommand too:
> 
> Autochanger {
>   Name = "TL2000"
>   Device = "HH-LTO7"
>   ChangerDevice = "/dev/pass1"
>   ChangerCommand = "sudo /etc/bacula/scripts/mtx-changer %c %o %S %a %d"
> }
> 
> For Perl, it is used by mtx-changer script. I see in mtx-changer that the 
> Perl command can be changed to commented by default awk/sed/cut commands. 
> Inside mtx-changer after the Perl command is this comment:
> 
> # If perl isn't installed, you can use by those commands
> 
> Best regards,
> Marcin Haba (gani)
> 
> On Wed, 10 Apr 2024 at 01:44, Neil Balchin  > wrote:
>> So I’m doing all of this from within a Freebsd Jail inside of Trueness.
>> 
>> Therefore although I can expose the /dev devices I can’t easily change their 
>> rwx properties so instead I added some lines to my sudoers config file that 
>> allows the www and bacula users to perform certain sudo functions without a 
>> password.
>> 
>> 
>> I added a sudo in front of my max-changer config in my bacula-sd.conf,  by 
>> my theory this should be just fine
>> 
>> I tested this command:  
>> root@Bacula1:~ # sudo -u bacula sudo /usr/local/share/bacula/mtx-changer 
>> /dev/pass1 slots
>> 24
>> root@Bacula1:~ # 
>> 
>> And as you can see I get the expected count of 24 slots
>> 
>> Unfortunately from console:  I get
>> 
>> *update slots
>> Automatically selected Catalog: MyCatalog
>> Using Catalog "MyCatalog"
>> The defined Storage resources are:
>>  1: File1
>>  2: File2
>>  3: HH-LTO7
>>  4: TL2000
>> Select Storage resource (1-4): 4
>> Connecting to Storage daemon TL2000 at localhost:9103 ...
>> 3306 Issuing autochanger "slots" command.
>> Device "TL2000" has 0 slots.
>> No slots in changer to scan.
>> *
>> 
>> Now when I try to add the Autochanger TL2000 in the API I get an error that 
>> it can’t find perl,  Is perl a preqequisite to bacula and I missed that ?
>> 
>> 
>> 
>> 
>> 
>>> On 9 Apr 2024, at 14:39, Marcin Haba >> > wrote:
>>> 
>>> Hello Neil,
>>> 
>>> From your description it looks that Bacularis works with the mtx-changer 
>>> script well.
>>> 
>>> For labeling volumes, as it is action realized by Bacula SD, so I think, it 
>>> might be good to check if the mtx-changer script is capable of being 
>>> correctly executed by the bacula user.
>>> 
>>> For test I would propose to try this command:
>>> 
>>> # sudo -u bacula /etc/bacula/scripts/mtx-changer /dev/pass1 slots
>>> 
>>> and also a good test could be trying to label a sample volume using 
>>> bconsole.
>>> 
>>> Best regards,
>>> Marcin Haba (gani)
>>> 
>>> On Tue, 9 Apr 2024 at 20:30, Rob Gerber >> > wrote:
 What happens when you click 'update slots' on the volumes page, and tell 
 it to update slots 1-24? Idk if this is relevant, but perhaps it is. 
 Should update bacula's knowledge of what is in the library, as per mtx. 
 The output once you click that button and tell it to update slots 1-24 
 should show that it knew about every tape's position in various slots in 
 the library. If it says anything about updating a record to reflect a tape 
 being in a certain slot, then its knowledge was incorrect and has been 
 corrected.
 
 Robert Gerber
 402-237-8692
 r...@craeon.net 
 On Tue, Apr 9, 2024, 1:14 PM Neil Balchin >>> > wrote:
> Ok Great,  that solves that problem
> 
> I’m almost there
> 
> I’m using a Dell TL2000 Tape library and a HH LTO7 drive 
> 
> I’ve added these to my bacula-sd ( configs pasted below). Also added the 
> Autochanger and Drives to the API device list
> 
> From the API gui. It’s clearly running the slots and status commands 
> properly. Because it shows the 19 tapes with barcodes ,  however when I 
> try to label these tapes from the volumes page it reports Zero slots
> 
> Autochanger {
>   Name = "TL2000"
>   Device = "HH-LTO7"
>   ChangerDevice = "/dev/pass1"
>   ChangerCommand = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
> }
> 
> Device {
>   Name = "HH-LTO7"
>   MediaType = "LTO-7"
>   ArchiveDevice = "/dev/sa0"
>   HardwareEndOfMedium = no
>   BackwardSpaceRecord = no
>   BsfAtEom = yes
>   TwoEof = yes
>   FastForwardSpaceFile = yes
>   RemovableMedia = yes
>   

Re: [Bacula-users] Wildfile

2024-04-10 Thread Bill Arlofski via Bacula-users

On 4/10/24 12:38 AM, Stefan G. Weichinger wrote:


Is this Fileset correct?

Fileset {
Name = "VM_xxx-y"
Include {
  Options {
WildFile = "\"/mnt/backup/vmbackup/Backup xxx-y/*.vbk\""
  }
}
}


I don't get files with this ... seems not to match.


Hello Stefan,

No, this will not backup anything because you have not specified anything to backup with a `File = /path/to/somewhere` inside 
of your `Include{}` block. So far, you have only set something (WildFile) inside of an `Option{}` block.


There are several ways to do what you want (there always is with Bacula :)

The first, based on your current Fileset template will require a `File =` line as mentioned above and also another 
`Options{}` block to exclude everything else:

8<
Fileset {
   Name = "VM_xxx-y"
   Include {
 # This option block matches your *.vbk files and creates a signature in 
the catalog for backed up files
 Options {
   signature = sha1   # You need a signature, so I 
added this
   WildFile = "/mnt/backup/vmbackup/*.vbk"# Note, I fixed your extra 
quotes and a backslash and simplified here
 }

 # This options block says to exclude everything else, not matched above
 Options {
   WildFile = "*.*"
   Exclude = yes
 }

 File = "/mnt/backup/vmbackup"  # And finally, what 'top level' 
directory are we considering for backups
   }
}
8<

This "Should work"™  I have not tested it, and wrote it quickly in my email client before finishing my first cup of coffee 
this morning. :)


Remember, when you have re-configured this Fileset and have issued a `reload` command in bconsole, instead or running the 
job, you can quickly see if your settings do what you want with an `estimate` command like:


* estimate listing job=

This way you don't have a bunch of failed jobs in your catalog. :)

P.S. I see your files (or directories, I am not 100% sure which) have spaces in their names.  I would recommend doing 
yourself a favor and not using spaces if you can help it. It will make your life easier and save you from needing to "escape" 
spaces with backslashes, etc.



Hope this helps,
Bill

--
Bill Arlofski
w...@protonmail.com



signature.asc
Description: OpenPGP digital signature
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] Wildfile

2024-04-10 Thread Stefan G. Weichinger

Am 10.04.24 um 14:25 schrieb Rob Gerber:

I don't think it is correct, no.

I am not an expert, but last time I tried something like this I believe 
the suggestion I was given was to use a runbefore script to run a find 
command or similar to locate and build a file list, then give that list 
to bacula as input for the job.


Perhaps for your runbefore use something like the following line.
mountpoint -q /mnt/backup/ && find '/mnt/backup/vmbackup/Backup xxx-y/' 
-type f -name '*.vbk' > /opt/bacula/working/VM_xxx-y.list ||
mount /mnt/backup/ && find /mnt/backup/vmbackup/Backup xxx-y/ -type f 
-name '*.vbk' > /opt/bacula/working/VM_xxx-y.list


If any part of this fails it SHOULD exit nonzero and the job will fail 
(which is what you want). I recommend testing this before relying on it. 
I've only written it in an email client. I assume using bash here.


I'm not certain how to include files from a list elsewhere, but I know 
it can be done. I think you do @/opt/bacula/working/VM_xxx-y.list in 
your fileset definition. Check the docs to be sure.


I can't believe that this could be that complicated to have to use a 
script before the dump!


my goal:

include all files "*.vbk"

or exclude "*.vib" in a given directory

-

I look at

https://www.bacula.org/13.0.x-manuals/en/main/Configuring_Director.html

section "FileSet Examples" and will try to copy that




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


Re: [Bacula-users] Wildfile

2024-04-10 Thread Rob Gerber
I don't think it is correct, no.

I am not an expert, but last time I tried something like this I believe the
suggestion I was given was to use a runbefore script to run a find command
or similar to locate and build a file list, then give that list to bacula
as input for the job.

Perhaps for your runbefore use something like the following line.
mountpoint -q /mnt/backup/ && find '/mnt/backup/vmbackup/Backup xxx-y/'
-type f -name '*.vbk' > /opt/bacula/working/VM_xxx-y.list ||
mount /mnt/backup/ && find /mnt/backup/vmbackup/Backup xxx-y/ -type f -name
'*.vbk' > /opt/bacula/working/VM_xxx-y.list

If any part of this fails it SHOULD exit nonzero and the job will fail
(which is what you want). I recommend testing this before relying on it.
I've only written it in an email client. I assume using bash here.

I'm not certain how to include files from a list elsewhere, but I know it
can be done. I think you do @/opt/bacula/working/VM_xxx-y.list in your
fileset definition. Check the docs to be sure.

Regards,
Robert Gerber
402-237-8692
r...@craeon.net

On Wed, Apr 10, 2024, 1:39 AM Stefan G. Weichinger  wrote:

>
> Is this Fileset correct?
>
> Fileset {
>Name = "VM_xxx-y"
>Include {
>  Options {
>WildFile = "\"/mnt/backup/vmbackup/Backup xxx-y/*.vbk\""
>  }
>}
> }
>
>
> I don't get files with this ... seems not to match.
>
>
>
> ___
> 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


[Bacula-users] Wildfile

2024-04-10 Thread Stefan G. Weichinger



Is this Fileset correct?

Fileset {
  Name = "VM_xxx-y"
  Include {
Options {
  WildFile = "\"/mnt/backup/vmbackup/Backup xxx-y/*.vbk\""
}
  }
}


I don't get files with this ... seems not to match.



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