Re: [Bacula-users] volumes, pools, media types and labels

2024-06-26 Thread Stefan G. Weichinger

Am 21.06.24 um 16:31 schrieb Radosław Korzeniewski:

Hello,

czw., 20 cze 2024 o 17:46 Stefan G. Weichinger <mailto:li...@xunil.at>> napisał(a):



Well, it looks for a volume named "Vol-xxx" in the tape loader,
which is
wrong.


Any chance you can share your job log here?


Sure ... quite busy at the moment AND in the last days this didn't 
happen anymore. I have to travel the next 2 days, so I decided to switch 
to "daily" only for now



 > Your configuration seems to be fine, but what Bacula says about your
 > configuration - check bconsole command show job=...
 > Did you reload your configuration after any change?

I restarted the daemons now and then, if that's the same.

 > Are your volumes labeled correctly?

I think so. That one "ghost volume" is created by Bacula somehow.


Any chance you can share your tape volume list here?


For the 2 pools "daily" and "File" (= storage Tape and File) ?
Can do in an hour or two.


There are multiple places it could be wrong. You will never know unless 
you will get a whole picture.

Now we only have a few puzzle pieces which do not match together.


I understand
Will try to come up with more pieces soon ;-)





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


Re: [Bacula-users] volumes, pools, media types and labels

2024-06-25 Thread Stefan G. Weichinger

Am 25.06.24 um 17:43 schrieb Martin Simmons:

On Tue, 25 Jun 2024 12:59:03 +0200, Stefan G Weichinger said:


I see various issues, maybe related to defective tapes also.

Volumes that are in mode "Append" are loaded and not written to as in:


25-Jun 12:52 samba-sd JobId 2840: 3304 Issuing autochanger "load Volume
CMR945L6, Slot 6, Drive 0" command.
25-Jun 12:52 samba-sd JobId 2840: 3305 Autochanger "load Volume
CMR945L6, Slot 6, Drive 0", status is OK.
25-Jun 12:53 samba-sd JobId 2840: Volume "CMR945L6" previously written,
moving to end of data.
25-Jun 12:53 samba-sd JobId 2840: Warning: For Volume "CMR945L6":
The number of files mismatch! Volume=350 Catalog=349
Correcting Catalog
25-Jun 12:53 samba-sd JobId 2840: [SI0202] End of Volume "CMR945L6" at
350:1 on device "HP-Ultrium" (/dev/nst0). Write of 262144 bytes got -1.
25-Jun 12:53 samba-sd JobId 2840: Re-read of last block succeeded.
25-Jun 12:53 samba-sd JobId 2840: End of medium on Volume "CMR945L6"
Bytes=1,310,721 Blocks=1 at 25-Jun-2024 12:53.
25-Jun 12:53 samba-sd JobId 2840: 3307 Issuing autochanger "unload
Volume CMR945L6, Slot 6, Drive 0" command.
25-Jun 12:54 samba-sd JobId 2840: 3304 Issuing autochanger "load Volume
CMR915L6, Slot 5, Drive 0" command.


I "Purge" them, mark them as "Append" ... doesn't work.


Don't manually mark them as "Append" because that tells Bacula to wind forward
to the end of the data before writing.  The "Purge" operation just affects the
catalog, not the data on the tape.
  
If configured correctly, Bacula should automatically reuse tapes that have

been marked as purged (either explicitly marked or implicitly after the
retention time has expired).


So I only "Purge" a "Full" tape?



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


Re: [Bacula-users] volumes, pools, media types and labels

2024-06-25 Thread Stefan G. Weichinger

Am 25.06.24 um 17:43 schrieb Martin Simmons:


I "Purge" them, mark them as "Append" ... doesn't work.


Don't manually mark them as "Append" because that tells Bacula to wind forward
to the end of the data before writing.  The "Purge" operation just affects the
catalog, not the data on the tape.
  
If configured correctly, Bacula should automatically reuse tapes that have

been marked as purged (either explicitly marked or implicitly after the
retention time has expired).


Ah, OK, that's helpful already. Thanks!



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


Re: [Bacula-users] volumes, pools, media types and labels

2024-06-25 Thread Stefan G. Weichinger

Am 25.06.24 um 12:59 schrieb Stefan G. Weichinger:

my director conf is 863 lines long, I assume I should pick out the 
relevant parts. Will try to.


ok, showing config

I removed Jobs and Filesets for other VMs and Samba-Shares, that are 
just edited copies of the shown ressources (I assume) to not flood you 
with too much information ...


the storages, pools, jobs etc are there

Basically I backup 2 types of directories:

* samba shares "Samba-xxx"
* Veeam-backup-dirs "VMxxx"

The VM-dirs are quite big in relation to the LTO-6 drives. So I would 
like to only backup the Veeam-incrementals (*.vib) on a daily basis and 
all the FULLs (*.vbk) only weekly or so


maybe that would be easier without two pools, just by using incremental 
and differential jobs?


->

pls go on and let me know what to improve and learn, *thanks* !


# cat bacula-sd.conf
Director {
  Name = "samba-dir"
  Password = "EkcGgtnIijvclGBT6fTwbT44bk5n-jKp8"
}
Director {
  Name = "samba-mon"
  Password = "grHDvYVIl7vMJCap91vxL6YtE6tqTWAaG"
  Monitor = yes
}
Storage {
  Name = "samba-sd"
  WorkingDirectory = "/opt/bacula/working"
  PidDirectory = "/opt/bacula/working"
  PluginDirectory = "/opt/bacula/plugins"
  MaximumConcurrentJobs = 20
}
Device {
  Name = "FileStorage"
  MediaType = "File"
  ArchiveDevice = "/mnt/backup/bacula"
  RemovableMedia = no
  RandomAccess = yes
  AutomaticMount = yes
  LabelMedia = yes
  AlwaysOpen = no
  SpoolDirectory = "/mnt/amhold/bacula"
  MaximumSpoolSize = 800
}
Device {
  Name = "HP-Ultrium"
  MediaType = "LTO-6"
  ArchiveDevice = "/dev/nst0"
  RemovableMedia = yes
  RandomAccess = no
  LabelMedia = yes
  AlwaysOpen = yes
  Autochanger = yes
  MaximumBlockSize = 262144
  MaximumFileSize = 8589934592
  SpoolDirectory = "/mnt/amhold/bacula"
  MaximumSpoolSize = 1
}
Messages {
  Name = "Standard"
  Director = samba-dir = All, !Mount
}
Autochanger {
  Name = "HP-Autoloader"
  Description = "HP 1x8 G2 AUTOLDR"
  Device = "HP-Ultrium"
  ChangerDevice = "/dev/sg8"
  ChangerCommand = "/opt/bacula/scripts/mtx-changer %c %o %S %a %d"
}

# cat bacula-fd.conf

Director {
  Name = samba-dir
  Password = "_iPxyMjXHv4sZ-5lrhCurMx8xx5JPpWYR"
}

Director {
  Name = samba-mon
  Password = "Q-bLbGVRNbzVYYL317KsXn1uasZNbkTCk"
  Monitor = yes
}

FileDaemon {  # this is me
  Name = samba-fd
  FDport = 9102  # where we listen for the director
  WorkingDirectory = /opt/bacula/working
  Pid Directory = /opt/bacula/working
  Maximum Concurrent Jobs = 20
  Plugin Directory = /opt/bacula/plugins
}

# Send all messages except skipped files back to Director
Messages {
  Name = Standard
  director = samba-dir = all, !skipped, !restored, !verified, !saved
}


# cat bacula-dir.conf

Director {
  Name = "samba-dir"
  Messages = "Daemon"
  QueryFile = "/opt/bacula/scripts/query.sql"
  WorkingDirectory = "/opt/bacula/working"
  PidDirectory = "/opt/bacula/working"
  MaximumConcurrentJobs = 20
  Password = "kIvNH99gymnS8oxBp1f0DigA8JLmXkSWp"
}
Client {
  Name = "samba-fd"
  Address = "samba"
  FdPort = 9102
  Password = "_iPxyMjXHv4sZ-5lrhCurMx8xx5JPpWYR"
  Catalog = "MyCatalog"
  FileRetention = 5184000
  JobRetention = 15552000
  AutoPrune = yes
}
Job {
  Name = "BackupCatalog"
  Level = "Full"
  Storage = "HP-Autoloader"
  Pool = "Daily"
  Fileset = "Catalog"
  Schedule = "WeeklyCycleAfterBackup"
  JobDefs = "DefaultJob"
  WriteBootstrap = "/opt/bacula/working/%n.bsr"
  Runscript {
RunsWhen = "Before"
RunsOnClient = no
Command = "/opt/bacula/scripts/make_catalog_backup.pl MyCatalog"
  }
  Runscript {
RunsWhen = "After"
RunsOnClient = no
Command = "/opt/bacula/scripts/delete_catalog_backup"
  }
  Priority = 11
}
Job {
  Name = "BackupClient1"
  JobDefs = "DefaultJob"
}
Job {
  Name = "RestoreFiles"
  Type = "Restore"
  Messages = "Standard"
  Storage = "HP-Autoloader"
  Pool = "Daily"
  Client = "samba-fd"
  Fileset = "Full Set"
  Where = "/opt/bacula/archive/bacula-restores"
}

Job {
  Name = "Samba-Devices"
  Type = "Backup"
  Fileset = "Samba_Devices"
  JobDefs = "DefaultJob"
}
Job {
  Name = "Samba-IT"
  Type = "Backup"
  Fileset = "Samba_Share_IT"
  JobDefs = "DefaultJob"
}
Job {
  Name = "VM-NOSV-DC01"
  Type = "Backup"
  Fileset = "VM_NOSV-DC01"
  JobDe

Re: [Bacula-users] volumes, pools, media types and labels

2024-06-25 Thread Stefan G. Weichinger

Am 19.06.24 um 09:46 schrieb Radosław Korzeniewski:

Then you should put all your new tapes in the Scratch pool during 
labeling, so Bacula can take one to the selected pool when required.
Finally you should configure the "Recycle" pool parameter pointing to 
the Scratch pool, so all your unused tapes will return to it, closing 
the cycle.


When carefully configured it will automatically rotate all your tapes, 
which is good for them.


The rule of thumb for the tape backups in Bacula is to use as few pools 
as possible. Especially for catalog backup which is technically 
redundant (unneeded, see below) and you save it for time saving only 
during recovery.
If you have a single tape drive then you are limited to a single pool 
usage at any given time, and all your jobs which require another pool 
will wait. When your backup window is tight then you want to avoid this.
I personally create tape pools based on required retention, i.e. Tape1W 
or Tape1M and join all the pools with similar retention time.



I think I have to start over with pools.

my approach with pools daily, weekly, monthly doesn't work so far

I see various issues, maybe related to defective tapes also.

Volumes that are in mode "Append" are loaded and not written to as in:


25-Jun 12:52 samba-sd JobId 2840: 3304 Issuing autochanger "load Volume 
CMR945L6, Slot 6, Drive 0" command.
25-Jun 12:52 samba-sd JobId 2840: 3305 Autochanger "load Volume 
CMR945L6, Slot 6, Drive 0", status is OK.
25-Jun 12:53 samba-sd JobId 2840: Volume "CMR945L6" previously written, 
moving to end of data.

25-Jun 12:53 samba-sd JobId 2840: Warning: For Volume "CMR945L6":
The number of files mismatch! Volume=350 Catalog=349
Correcting Catalog
25-Jun 12:53 samba-sd JobId 2840: [SI0202] End of Volume "CMR945L6" at 
350:1 on device "HP-Ultrium" (/dev/nst0). Write of 262144 bytes got -1.

25-Jun 12:53 samba-sd JobId 2840: Re-read of last block succeeded.
25-Jun 12:53 samba-sd JobId 2840: End of medium on Volume "CMR945L6" 
Bytes=1,310,721 Blocks=1 at 25-Jun-2024 12:53.
25-Jun 12:53 samba-sd JobId 2840: 3307 Issuing autochanger "unload 
Volume CMR945L6, Slot 6, Drive 0" command.
25-Jun 12:54 samba-sd JobId 2840: 3304 Issuing autochanger "load Volume 
CMR915L6, Slot 5, Drive 0" command.



I "Purge" them, mark them as "Append" ... doesn't work.

I don't get a "weekly" run to write to 4 tapes in a row without my 
intervention. Bad.


---

Yes, I should show my config.

I assume dropping the configfiles to my nextcloud isn't appreciated as 
then the mailing list archives won't contain all information ...


my director conf is 863 lines long, I assume I should pick out the 
relevant parts. Will try to.






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


Re: [Bacula-users] volumes, pools, media types and labels

2024-06-21 Thread Stefan G. Weichinger

On 21.06.24 16:31, Radosław Korzeniewski wrote:

There are multiple places it could be wrong. You will never know unless 
you will get a whole picture.

Now we only have a few puzzle pieces which do not match together.


Sure, I will compile config and logs asap and come back here.
thanks



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


Re: [Bacula-users] volumes, pools, media types and labels

2024-06-20 Thread Stefan G. Weichinger

Am 20.06.24 um 17:32 schrieb Radosław Korzeniewski:

Great! So what job logs say about a volume selection when it selects "a 
wrong volume"?


Well, it looks for a volume named "Vol-xxx" in the tape loader, which is 
wrong.


Your configuration seems to be fine, but what Bacula says about your 
configuration - check bconsole command show job=...

Did you reload your configuration after any change?


I restarted the daemons now and then, if that's the same.


Are your volumes labeled correctly?


I think so. That one "ghost volume" is created by Bacula somehow.


Pool "daily" should not create a "Vol-" volume in the "File" storage
...
it shouldn't use "File" at all.


Yes, if you configured it as described.
I never had such a mistake in Bacula when correctly configured, but I've 
seen this kind of mistake when incorrectly configured.


Well, that's why I posted the config lines ;-)
I agree and know that something is incorrectly configured. The question 
is: what?



 > Finally you should configure the "Recycle" pool parameter
pointing to
 > the Scratch pool, so all your unused tapes will return to it,
closing
 > the cycle.
 > When carefully configured it will automatically rotate all your
tapes,
 > which is good for them.
 >
 > I hope it helps

phew, sounds even more complicated to me right now


As you wish. A default Bacula configuration which comes with a default 
installation is the best suited for disk based backups and this is what 
you call "clever defaults or automatisms" as it works perfectly from the 
start.
It is not meant to be used "as-is" for tape backups and needs more 
customizations.


I appreciate your help and I am ready to learn. If I have to adjust 
things for using tapes: ok ...


Basically I could also get rid of the whole storage "File" including the 
volumes. It was temporary only, the main goal is to write backups to 
physical tapes. But I take this as a "challenge" to learn more about the 
mechanisms of Bacula.


(if I get migrate-jobs from File to Tape working without losing any 
data, that might be even better ... then remove storage "File" after 
doing so)


thanks, Stefan



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


Re: [Bacula-users] volumes, pools, media types and labels

2024-06-19 Thread Stefan G. Weichinger

Am 19.06.24 um 09:46 schrieb Radosław Korzeniewski:


Did you label your tapes? You can't use tapes in Bacula without labeling.


Sure I did!

When you label your tapes, just use "barcodes" options and Bacula will 
read all barcodes from tapes and label them to match.
Then you should put all your new tapes in the Scratch pool during 
labeling, so Bacula can take one to the selected pool when required.


That's new to me. Is it relevant for my current issue?
I want it to use existing volumes, not new ones.

Pool "daily" should not create a "Vol-" volume in the "File" storage ... 
it shouldn't use "File" at all.


Finally you should configure the "Recycle" pool parameter pointing to 
the Scratch pool, so all your unused tapes will return to it, closing 
the cycle.
When carefully configured it will automatically rotate all your tapes, 
which is good for them.


I hope it helps


phew, sounds even more complicated to me right now

-> adding Scratch pool


addon: for weekly and monthly the catalog should run to the according
tapes, not to a "daily" tape, right?


The rule of thumb for the tape backups in Bacula is to use as few pools 
as possible. Especially for catalog backup which is technically 
redundant (unneeded, see below) and you save it for time saving only 
during recovery.
If you have a single tape drive then you are limited to a single pool 
usage at any given time, and all your jobs which require another pool 
will wait. When your backup window is tight then you want to avoid this.
I personally create tape pools based on required retention, i.e. Tape1W 
or Tape1M and join all the pools with similar retention time.


Somewhere I read the catalog should (additionally?) be written to File,
that would complicate it even more.


You should save your BSR file offsite in a secure place this will save a 
lot of your precious time during recovery.
A file based volumes are easier to handle, a tape based volumes could be 
easier to handle for offsite storage.

So, it all depends on your requirements and ability to fulfill them.
*) your volumes archive all data required for future catalog recovery; 
this kind of recovery requires volume scan to populate catalog data, 
which can take time to complete; so, it is better and faster to save 
catalog backup to avoid volume scan.


ok, I think I understand ... but actually I don't see the todo for my 
original issue right now.






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


[Bacula-users] volumes, pools, media types and labels

2024-06-19 Thread Stefan G. Weichinger


I have an annoying issue that I don't yet understand

I read the howtos around volumes and media type etc but so far couldn't 
get it working:


There are 2 storages "File" and "HP-Autoloader" ... so disk- and 
tape-based backups.


There are pools like "daily" "weekly" "monthly" that contain physical tapes.

"daily" and "weekly" have labels like "CMR123L6" (side question: I'd 
like to configure that as well into the pools. What would be the 
LabelFormat here?)


"monthly" has "ARC123L6"

and the file-based volumes get LabelFormat = "Vol-"

The physical tapes use

MediaType = "LTO-6"

the disk-based virtual tapes use

MediaType = "File"

Now where´s the problem?

It seems that the Job "BackupCatalog" (sometimes?) creates a new volume 
like "Vol-252", but with MediaType "LTO-6", which is then NOT FOUND in 
the tape autoloader. Sure, this one doesn't exist. "Vol-" volumes are 
for storage "File" only.


So the whole queue of Jobs gets stuck because of this.

I read that Director and Storage Daemon somehow have to agree on Media 
Types etc . I have:



## sd

Device {
  Name = "FileStorage"
  MediaType = "File"
  ArchiveDevice = "/mnt/backup/bacula"
  RemovableMedia = no
  RandomAccess = yes
  AutomaticMount = yes
  LabelMedia = yes
  AlwaysOpen = no
  SpoolDirectory = "/mnt/amhold/bacula"
  MaximumSpoolSize = 800
}
Device {
  Name = "HP-Ultrium"
  MediaType = "LTO-6"
  ArchiveDevice = "/dev/nst0"
  RemovableMedia = yes
  RandomAccess = no
  LabelMedia = yes
  AlwaysOpen = yes
  Autochanger = yes
  MaximumBlockSize = 262144
  MaximumFileSize = 8589934592
  SpoolDirectory = "/mnt/amhold/bacula"
  MaximumSpoolSize = 1
}


## director


Storage {
  Name = "File"
  SdPort = 9103
  Address = "samba"
  Password = "xxx"
  Device = "FileStorage"
  MediaType = "File"
}
Storage {
  Name = "HP-Autoloader"
  SdPort = 9103
  Address = "samba"
  Password = "xxx"
  Device = "HP-Autoloader"
  MediaType = "LTO-6"
  Autochanger = "HP-Autoloader"
  MaximumConcurrentJobs = 1
}


# pools

Pool {
  Name = "Daily"
  Description = "daily backups"
  PoolType = "Backup"
  MaximumVolumes = 30
  VolumeRetention = 864000
  Storage = "HP-Autoloader"
}
Pool {
  Name = "Default"
  PoolType = "Backup"
  MaximumVolumes = 100
  MaximumVolumeBytes = 53687091200
  VolumeRetention = 31536000
  AutoPrune = yes
  Recycle = yes
}
Pool {
  Name = "File"
  PoolType = "Backup"
  LabelFormat = "Vol-"
  MaximumVolumes = 101
  MaximumVolumeBytes = 53687091200
  VolumeRetention = 432000
  NextPool = "Daily"
  Storage = "File"
  AutoPrune = yes
  Recycle = yes
}
Pool {
  Name = "Monthly"
  Description = "monthly backups"
  PoolType = "Backup"
  UseVolumeOnce = no
  Storage = "HP-Autoloader"
}
Pool {
  Name = "Scratch"
  PoolType = "Backup"
}
Pool {
  Name = "Weekly"
  Description = "weekly backups"
  PoolType = "Backup"
  UseVolumeOnce = no
  VolumeRetention = 2592000
  Storage = "HP-Autoloader"
}

# Job


Job {
  Name = "BackupCatalog"
  Level = "Full"
  Storage = "HP-Autoloader"
  Fileset = "Catalog"
  Schedule = "WeeklyCycleAfterBackup"
  JobDefs = "DefaultJob"
  WriteBootstrap = "/opt/bacula/working/%n.bsr"
  Runscript {
RunsOnClient = no
RunsWhen = "Before"
Command = "/opt/bacula/scripts/make_catalog_backup.pl MyCatalog"
  }
  Runscript {
RunsOnClient = no
RunsWhen = "After"
Command = "/opt/bacula/scripts/delete_catalog_backup"
  }
  Priority = 11
  Pool = "Daily"
}


Anything missing? I get a bit lost here and don't want to 
"overconfigure" things where there might be clever defaults or automatisms.


addon: for weekly and monthly the catalog should run to the according 
tapes, not to a "daily" tape, right?


Somewhere I read the catalog should (additionally?) be written to File, 
that would complicate it even more.


Thanks in advance for any help here. It seems that is the missing bit 
for this config to be running autonomously for a week or so (which isn't 
the case yet unfortunately ...)


Stefan


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


Re: [Bacula-users] Bacularis: set of rights for tape operators

2024-06-13 Thread Stefan G. Weichinger

Am 13.06.24 um 14:05 schrieb Marcin Haba:

This is wrong because if multiple commands are closed in one big quotes, 
it is treated as one command that does not exist, so it causes no access 
to anything.


You need to write it as this (without quotes):

   CommandAcl = gui, .api, .status, .storage, delete, show, mount, 
umount, label, update


Or in a way as Bacularis writes mutli-value directives:

   CommandAcl = ".api"
   CommandAcl = "gui"
   CommandAcl = ".status"
   CommandAcl = ".storage"
   CommandAcl = "delete"
   CommandAcl = "show"
   CommandAcl = "mount"
   CommandAcl = "umount"
   CommandAcl = "label"
   CommandAcl = "update"

Both work in the same way.


ok, thanks. corrected that, restarted bacula-dir .. that user still sees 
both Storage-Resources. Anyway, not a problem right now.





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


Re: [Bacula-users] Bacularis: set of rights for tape operators

2024-06-13 Thread Stefan G. Weichinger

Am 13.06.24 um 12:44 schrieb Marcin Haba:

You don't need to restart anything. Are you sure that you set all 
CommandAcl directive values in the Console ACL? They should be one 
command per one CommandAcl field:


CommandAcl = gui
CommandAcl = .api
CommandAcl = .status
CommandAcl = .storage
CommandAcl = delete
CommandAcl = show
CommandAcl = mount
CommandAcl = umount
CommandAcl = label
CommandAcl = update

If storage is not listed in the storage table it can be that the 
.storage command is missing there. Could you confirm it? Also StorageAcl 
needs to be set to all Storage that should be available for that user.


all there, looks like this on the shell:

Console {
  Name = "tape-operator-ACL"
  Password = ""
  StorageAcl = "HP-Autoloader"
  CommandAcl = "gui, .api, .status, .storage, delete, show, mount, 
umount, label, update"

}


I want to get the information which tapes to insert into the
loader. Which ones are "overwritable" right now, what is needed for the
next jobs to be successful. I'd like not to have to process retention
times etc by myself.


I understand. Thanks. I don't know exactly this type of function in 
Bacula, however in the status director is information about the next 
volume for scheduled backup jobs. In Bacularis it is in (Director -> 
Tab: Actions -> Button: Status director  ->  SubTab: Raw status). For 
restore the required volumes are listed in the restore wizard before 
starting the restore.


ok. I see. Thanks so far!



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


Re: [Bacula-users] Again LTO9 and performances...

2024-06-13 Thread Stefan G. Weichinger


interested as well, I need to speedup my weekly/monthly FULL runs 
(with LTO6, though: way slower anyway).


Shouldn't the file daemon do multiple jobs in parallel?

To tape you can only write ONE stream of data.

To the spooling disk there could be more than one stream.


Yes, that seems wrong:
$ grep Concurrent *.conf
bacula-dir.conf:  Maximum Concurrent Jobs = 50
bacula-dir.conf:  Maximum Concurrent Jobs = 50
bacula-fd.conf:  Maximum Concurrent Jobs = 50
bacula-sd.conf:  Maximum Concurrent Jobs = 50


Sorry, I still don't understand what to adjust ;-)

that interleaving to tape sounds dangerous to me.

What I want to have: the fd(s) should be able to dump backups to the 
spooling directory WHILE in parallel the sd spools previous backup jobs 
from spooling directory to tape (assuming I have only one tape drive, 
which is the case)


-> parallelizing things more

thanks!





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


Re: [Bacula-users] Bacularis: set of rights for tape operators

2024-06-13 Thread Stefan G. Weichinger

Am 13.06.24 um 10:24 schrieb Marcin Haba:
On Thu, 13 Jun 2024 at 10:02, Stefan G. Weichinger <mailto:li...@xunil.at>> wrote:

I don't see how to assign the ACL to that user, sry


  In the create API basic user window there is an option with label:

"Create dedicated Bconsole config file"

When you check this checkbox, you will see the Console ACL and Director 
to select. It is exactly this option and this select to choose Console ACL.


found, ok. Did so but now the user sees NO Storage in "Storage" although 
I chose the autoloader in the ACL etc


Do I have to restart things after that patch or so?

Yes, if the Console ACL will be assigned, then the user will see only 
storage resources allowed by the Console ACL. For volumes, it isn't part 
of Console ACLs, so they are listed all.


ok
our file-based volumes will be deleted soon anyway. And that guy is 
intelligent, he's able to filter information :-)



The user is able to "Update slots", nice .. this is important if he
swaps tapes etc

Ah, that leads me to another newbie question:

with amanda there was a command that showed me which tapes from which
pool were to be inserted next. So amanda checked retention times etc
etc
and asked for the next tapes to be overwritten. I haven't yet seen or
understood if Bacula is also able to provide me or the tape operator
with a list of tapes to be inserted (or even which ones to take out of
the library).

So far I look for "Full" tapes and remove them etc


I am not sure if I understand this question. What type of inserting do 
you have on mind? Is it a list of volumes that will be used in backups 
or something else?


I would I want to get the information which tapes to insert into the 
loader. Which ones are "overwritable" right now, what is needed for the 
next jobs to be successful. I'd like not to have to process retention 
times etc by myself.




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


Re: [Bacula-users] Bacularis: set of rights for tape operators

2024-06-13 Thread Stefan G. Weichinger

Am 12.06.24 um 17:09 schrieb Marcin Haba:

Hello Stefan,

Thanks for your question. It showed me that it might be good to 
add descriptions for the resources available for each role and probably 
a new section in the documentation that describes it.


For the question about setting access for the tape operator, I assume 
that you have the tape library already configured with Bacularis. 
Setting this access for that user can be done in various ways. Below I 
described the most detailed manual way (without using wizards) that 
enables to set most options and tune access exactly to what needed.


At first: thank you for the quick and detailed reply! Going through 
right now.



So, the steps are following:

1) I would propose to create a new role for the tape operator with the 
following resources assigned (Security -> Tab: Roles):


  - VolumeList - that gives access to the volume list page
  - VolumeView - that gives access to the detailed single volume view page
  - StorageList - that gives access to the storage list page
  - StorageView - that gives access to the single storage view page

2) Then I would propose to create a console ACL (Security -> Tab: 
Console Acls) with:


  - StorageAcl - that has defined all storage resources for which you 
would like to give access for the tape operator
  - CommandAcl - with commands: gui, .api, .status, .storage, delete, 
show, mount, umount, label, update


3) Next I would create a new API user. Normally it can be done in 
(Security -> Tab: API basic users) but during preparing this mail I 
found a bug in this function. Because of that please apply a one line 
patch (for version 3.2.0) from attachment to file located usually here:


/usr/share/bacularis/protected/API/Modules/BaculaConfig.php

Once it is done, you can create in (Security -> Tab: API basic users) 
new tape operator user and assign to it the Console Acl from point 2)


I don't see how to assign the ACL to that user, sry


4) At the end I would create a new API host connection (Security -> Tab: 
API hosts) to the API host with the tape library and Bacularis API 
installed providing basic user credentials from step 3)


5) Finally I would create a new Bacularis Web user for this tape 
operator (Security -> Tab: Users) with:


  - tape operator role created in point 1)
  - API host created in point 4)

6) [Extra point] To avoid modifying by the tape operator anything 
related to the Bacula SD configuration, you can switch all Bacula 
resources for this user to 'read-only' or 'no access' mode. It is 
possible to do on (API Panel -> Basic users -> Edit: tape operator 
user). There you can set "read-only" or "no access" permissions for 
every Bacula resource or all at once (Resource permissions section).



looks promising. That user sees STorage and Volumes, although currently 
it sees both "File" and "Tape" volumes ... both pools, both storages.


That isn't a problem for me, it's just missing, maybe because I skipped 
6) and 3) isn't fully done. (patch applied, yes)


The user is able to "Update slots", nice .. this is important if he 
swaps tapes etc


Ah, that leads me to another newbie question:

with amanda there was a command that showed me which tapes from which 
pool were to be inserted next. So amanda checked retention times etc etc 
and asked for the next tapes to be overwritten. I haven't yet seen or 
understood if Bacula is also able to provide me or the tape operator 
with a list of tapes to be inserted (or even which ones to take out of 
the library).


So far I look for "Full" tapes and remove them etc

hints welcome

Thanks so far, in an hour I show the tape op around Bacularis for the 
first time :-)




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


[Bacula-users] Bacularis: set of rights for tape operators

2024-06-12 Thread Stefan G. Weichinger



Could someone point me at a HOWTO or doc or point out a meaningful list 
of roles/permissions to assign to a bacularis user who should be able to:


- list volumes
- manage the autochanger

maybe later

- label volumes

?

I don't want to give that employee full access, but I am a bit 
overwhelmed by the many possible "Resources" available in the 
Security-Roles-Tab.


thanks


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


Re: [Bacula-users] Again LTO9 and performances...

2024-06-11 Thread Stefan G. Weichinger

Am 06.06.24 um 15:57 schrieb Marco Gaiarin:

Mandi! Josh Fisher via Bacula-users
   In chel di` si favelave...


Not for a single job. When the storage daemon is writing a job's spooled
data to tape, the client must wait. However, if multiple jobs are
running in parallel, then the other jobs will continue to spool their
data while one job is despooling to tape.


I come back on this. I've setup on director's storage Autochanger{}
configuration:

Maximum Concurrent Jobs = 5

but i've set on storage configuration, in the Device{} stanza:

Maximum Concurrent Jobs = 1

as suggested for tapes; clearly i've only one device/tape. I've defined two
jobs, but the first run, the second:

is waiting on Storage "BPBKPLOMAutochanger"

And don't start to spool data, wait there indefinetively.


What i'm missing?! Thanks.


interested as well, I need to speedup my weekly/monthly FULL runs (with 
LTO6, though: way slower anyway).


Shouldn't the file daemon do multiple jobs in parallel?

To tape you can only write ONE stream of data.

To the spooling disk there could be more than one stream.





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


[Bacula-users] Migration job(s)

2024-06-07 Thread Stefan G. Weichinger



I had to run backups to Disk only while the tape drive was repaired.

Now the drive returned and I would like to migrate all the backups on 
disk to tape.


"Migrate" Jobs should help here, right?

I defined a job like this:

Job {
  Name = "migrate-to-tape"
  Type = "Migrate"
  Storage = "File"
  Pool = "File"
  NextPool = "Daily"
  JobDefs = "DefaultJob"
  PurgeMigrationJob = no
  MaximumSpawnedJobs = 20
  SelectionPattern = "."
  SelectionType = "Volume"
}

* If this gets started it generates 2 jobs per "source job", it seems. 
Is that correct?


* Do I have to remove the source volumes from disk by myself? I was 
assuming I could have Bacula do that: as soon as the backups are 
migrated to tape, the original disk-based volumes could/should be 
removed in my case. I don't want to keep them.


* PurgeMigrationJob: if I set this to Yes, does that mean that the 
"source job" is deleted after a successful migration? Only the job in 
terms of "that one run" and not its definition, right?


* Would a SelectionPattern like this "Vol-0." work? A wildcard with "*" 
did not work as I expected.


Thanks all!


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


Re: [Bacula-users] HP 1/8 G2 Autoloader

2024-06-06 Thread Stefan G. Weichinger

Am 03.06.24 um 08:51 schrieb Stefan G. Weichinger:

Fourth, please reply back with the results from the above tests, and 
with any other information you think may be important.


I will do asap. Right now I wait for their admin to swap all the tapes etc


the btape test went completely OK

In the last days I wrote several tapes, works now. In the next hour all 
tapes are changed in the loader, so I will see how these tapes are 
recognized.


I have questions around migrate jobs and scheduling. Unsure if to start 
a new thread, it gets off-topic regarding the subject of the original 
posting ...




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


Re: [Bacula-users] HP 1/8 G2 Autoloader

2024-06-03 Thread Stefan G. Weichinger

Am 02.06.24 um 17:00 schrieb Rob Gerber:
Well, I think something is wrong here. I WOULD NOT write any data or an 
EOF to any production tapes with valuable data. This will almost 
certainly lead to data loss. To be perfectly clear, if you rewind a tape 
and write EOF to that tape, the data previously written to that tape 
will be inaccessible without specialist hardware! The new (repaired?) 
drive should be able to read your old backups!


You are right.
And no worries, I only write that WEOF to tapes I want to "reset", I 
don't expect to read any data from them after doing so.


In theory you should be able to take tapes from drive A and read and 
write them from drive B where both drives are the same LTO generation. 
Tapes having been labeled in a different drive of the same generation 
should not have any impact on a different drive of the same generation 
being able to read or write that tape. If you think about it, 
organizations often use libraries with multiple tape drives installed 
inside them and beyond ensuring that the correct tape generation is 
loaded into the correct drives, backups written by these libraries 
aren't locked to a specific tape drive. Organizations also ship tapes 
across the world to other sites for data transfer. Being locked to a 
single tape drive would be an absolutely unacceptable state of affairs. 
So something is wrong in your case.


Right again. Makes me worry ...


Things to try:

Please document the specific errors you have been seeing, and the 
results for the following tests.


First, you should be able to insert a previously used tape that should 
have good data from the old drive on it, and perform a restore against 
that tape. If this fails, something is definitely wrong.


I will try that later today.

Secondly, if you put a scratch tape with no valuable data on it (THIS 
TAPE WILL BE OVERWRITTEN AND ALL DATA ON IT WILL BE LOST) and run the 
btape calibration utility, then run the btape test commands, what 
results do you get? (Check utility and problem resolution manuals for 
more info). If this fails, the drive is probably still defective.


I ran the test last week after receiving the repaired drive and the 
tests were completely OK.


Third, are you using an encryption key in your drive? If you were, you 
may need to reload that key into the drive firmware. The repair process 
may have involved factory resetting the tape drive or otherwise deleting 
the encryption key from memory. If this is the case, it could explain 
why you have been having issues with previously labeled tapes.


no encryption key

Fourth, please reply back with the results from the above tests, and 
with any other information you think may be important.


I will do asap. Right now I wait for their admin to swap all the tapes etc



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


Re: [Bacula-users] HP 1/8 G2 Autoloader

2024-06-02 Thread Stefan G. Weichinger



the drive was repaired, the head (?) replaced

Now I have issues with the tapes labeled by the old drive ...

I assume I should relabel them but that alone doesn't always lead to 
bacula correctly recognizing the tapes.


And the procedure to relabel multiple tapes is a bit of manual work 
because I have to do that "mt -f /dev/nst0 weof" step, right?


Does it make sense to write more to a tape in that step? A GB of random 
data or so?




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


Re: [Bacula-users] HP 1/8 G2 Autoloader

2024-05-23 Thread Stefan G. Weichinger

Am 20.05.24 um 11:44 schrieb Stefan G. Weichinger:


Is there an easy way to delete all volumes belonging to a specific Job-ID?

For now I looked it up in Bacularis: check which jobs are on which 
(disk-based) volume, rm the volume in Bacularis, then rm the 
corresponding file from disk (in the shell).


OK so far, I am just curious if there is a clever way for that in Bacula.


quicker way: look up the job logs in bacularis, in the raw log the used 
volumes are listed. At least that helps.




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


Re: [Bacula-users] HP 1/8 G2 Autoloader

2024-05-20 Thread Stefan G. Weichinger

Am 15.05.24 um 16:02 schrieb Rob Gerber:

To manually remove the disk volumes, and associated job and file 
entries, do a delete operation. Easily done in Bacularis or baculum, (I 
haven't done it in bconsole though I'm sure it's doable there too). I 
would have a catalog backup restored BEFORE I performed the delete 
operation, and I would be very careful to select the correct volumes to 
delete.


I have to balance things now until we have a new tape drive.

disk runs full ...

Is there an easy way to delete all volumes belonging to a specific Job-ID?

For now I looked it up in Bacularis: check which jobs are on which 
(disk-based) volume, rm the volume in Bacularis, then rm the 
corresponding file from disk (in the shell).


OK so far, I am just curious if there is a clever way for that in Bacula.



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


Re: [Bacula-users] HP 1/8 G2 Autoloader

2024-05-16 Thread Stefan G. Weichinger

Am 15.05.24 um 16:02 schrieb Rob Gerber:
Stefan, are your bacula catalog backups being made to a disk volume, as 
is default, or to a tape volume? If being made to a disk volume you 
could restore a catalog backup. If your catalog backups were being made 
to that same machine whose backups were purged, and you lost the 
database entries for the catalog backups, you can still run bscan 
against the catalog backups to do a restore.


By default, a database restore will purge all other entries in the 
database. So if you're going to make a restore of the bacula catalog 
you'll need to do it soon vs later OR maybe try to do some hybrid method 
where you restore entries partially later, but I have no knowledge of 
how to do that and I don't know how dangerous or foolish such a thing 
may be.


I assume right now you aren't doing many or any backups because your 
tape drive is down (except for the backups made to disk that you're 
trying to purge/prune because you accidentally backed up data that's too 
big for your disk storage). However, once you start running more backups 
you increasingly accumulate more catalog data you don't want to lose.


If catalog entries for volumes other than the disk volumes on your 
storage were lost (backups made to tape via that client), your system 
might attempt to automatically reuse tape volumes once your tape system 
is back online, thereby overwriting backups you'd want to keep. Maybe 
watch out for that.


The data on your tape volumes is obviously still available, and worst 
case you could do a bscan operation against those volumes once tape 
drive is operational again. Would just have to be sure any impacted 
tapes aren't automatically overwritten. A bscan operation would 
definitely take a while, depending on how many tapes are impacted (if any).


A catalog restore is almost certainly what you want to do, presuming 
there isn't a bunch of new catalog entries made after the accidental 
purge event.


To manually remove the disk volumes, and associated job and file 
entries, do a delete operation. Easily done in Bacularis or baculum, (I 
haven't done it in bconsole though I'm sure it's doable there too). I 
would have a catalog backup restored BEFORE I performed the delete 
operation, and I would be very careful to select the correct volumes to 
delete.


Thanks for your detailed reply!  I decided to just continue with that 
status ... and rm-ed the orphaned volume-files manually.


This is a temporary storage only (I assume), as we send in the tape 
drive for analysis and repair. I don't know what to expect for a 10 yr 
old LTO-6 drive ... but that's the cheapest and first option right now.


I adjusted my setup to use more space for the file storage, add 
compression to some jobs and let Bacula use more virtual tapes.


So far the jobs succeed ...

thanks anyway, the information is precious for the future, maybe ...

ps: afai understand the catalog backups went to tape as well. Right now 
they go to "File", sure.




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


Re: [Bacula-users] HP 1/8 G2 Autoloader

2024-05-15 Thread Stefan G. Weichinger

Am 08.05.24 um 13:13 schrieb Stefan G. Weichinger:


I assume the drive has a problem.


we used a new cleaning tape and a new LTO tape, btape still fails

I tend to say this drive is defective

Today the IT and the CEOs decide how to proceed.

For now I created a temporary file-based storage on disk.

As if it isn't dangerous enough right now I made a mistake:

at first I had the huge veeam-files dumped to disk, I didn't want that. 
So I tried to delete jobs or volumes in bacularis, but that didn't 
remove the files on disk.


googled and found some hint to "purge" ... now I purged all jobs from my 
single client even the good ones :-(


Now I have volumes on disk with no jobs in the DB. I re-run the valid 
jobs right now, this creates new "virtual tapes" now, but I have to 
(manually?) remove all those orphaned volumes to free space.






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


Re: [Bacula-users] HP 1/8 G2 Autoloader

2024-05-08 Thread Stefan G. Weichinger



I assume the drive has a problem.

btape append test fails ...

dmesg:

[Mi Mai  8 10:18:32 2024] scsi 1:0:7:1: Power-on or device reset occurred
[Mi Mai  8 10:18:32 2024] ch 1:0:7:1: [ch0] reading element address 
assignment page failed!
[Mi Mai  8 10:18:32 2024] ch 1:0:7:1: [ch0] INITIALIZE ELEMENT STATUS, 
may take some time ...

[Mi Mai  8 10:18:32 2024] ch 1:0:7:1: [ch0] ... finished
[Mi Mai  8 10:18:32 2024] ch 1:0:7:1: Attached scsi changer ch0
[Mi Mai  8 10:18:32 2024] ch 1:0:7:1: Attached scsi generic sg8 type 8
[Mi Mai  8 10:18:32 2024]  end_device-1:7: add: handle(0x0009), 
sas_addr(0x50014380271a413e)
[Mi Mai  8 10:33:50 2024] mpt2sas_cm0: log_info(0x31120434): 
originator(PL), code(0x12), sub_code(0x0434)

[Mi Mai  8 10:35:53 2024] st 1:0:7:0: [st0] Block limits 1 - 16777215 bytes.
[Mi Mai  8 10:45:58 2024] st 1:0:7:0: [st0] Sense Key : Medium Error 
[current]

[Mi Mai  8 10:45:58 2024] st 1:0:7:0: [st0] Add. Sense: Write error
[Mi Mai  8 10:45:58 2024] st 1:0:7:0: [st0] Sense Key : Medium Error 
[deferred]

[Mi Mai  8 10:45:58 2024] st 1:0:7:0: [st0] Add. Sense: Write error
[Mi Mai  8 10:48:17 2024] st 1:0:7:0: [st0] Sense Key : Medium Error 
[current]
[Mi Mai  8 10:48:17 2024] st 1:0:7:0: [st0] Add. Sense: Recorded entity 
not found
[Mi Mai  8 10:50:40 2024] st 1:0:7:0: [st0] Sense Key : Medium Error 
[current]
[Mi Mai  8 10:50:40 2024] st 1:0:7:0: [st0] Add. Sense: Recorded entity 
not found
[Mi Mai  8 10:53:01 2024] st 1:0:7:0: [st0] Sense Key : Medium Error 
[current]
[Mi Mai  8 10:53:01 2024] st 1:0:7:0: [st0] Add. Sense: Recorded entity 
not found
[Mi Mai  8 10:54:53 2024] st 1:0:7:0: [st0] Sense Key : Medium Error 
[current]
[Mi Mai  8 10:54:53 2024] st 1:0:7:0: [st0] Add. Sense: Recorded entity 
not found



tomorrow a technician checks the library for debris etc ... but he 
doesn't have tape experience. Plus: no fresh tapes at hand, so basically 
it will be the same tests as today more or less.





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


Re: [Bacula-users] HP 1/8 G2 Autoloader

2024-05-08 Thread Stefan G. Weichinger



even btape fails

# /opt/bacula/bin/btape /dev/nst0
Tape block granularity is 1024 bytes.
btape: butil.c:298-0 Using device: "/dev/nst0" for writing.
btape: btape.c:477-0 open device "HP-Ultrium" (/dev/nst0): OK
*test

=== Write, rewind, and re-read test ===

I'm going to write 1 records and an EOF
then write 1 records and an EOF, then rewind,
and re-read the data to verify that it is correct.

This is an *essential* feature ...

btape: block.c:303-0 [SE0201] Write error at 0:0 on device "HP-Ultrium" 
(/dev/nst0) Vol=. ERR=Eingabe-/Ausgabefehler.
08-Mai 09:08 btape JobId 0: Error: block.c:303 [SE0201] Write error at 
0:0 on device "HP-Ultrium" (/dev/nst0) Vol=. ERR=Eingabe-/Ausgabefehler.
08-Mai 09:10 btape JobId 0: Error: Error writing final EOF to tape. 
Volume  may not be readable.
tape_dev.c:976 ioctl MTWEOF error on "HP-Ultrium" (/dev/nst0). 
ERR=Eingabe-/Ausgabefehler.

btape: btape.c:1156-0 Error writing block to device.



dmesg reports "Medium Error"

tried to label a tape with Amanda to maybe write data there, labelling 
worked but writing: no


I don't think there's a tape stuck because I can unload and change tapes 
by operating the loader via mtx or bacularis.


Unfortunately they don't have fresh tapes on site.

I tell them to not only reboot the device but turn it off and on again 
... maybe that resets something.


And I let them remove all tapes and check the magazines.





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


Re: [Bacula-users] HP 1/8 G2 Autoloader

2024-05-07 Thread Stefan G. Weichinger

Am 07.05.24 um 18:21 schrieb Rob Gerber:

Wait a sec - look at this again:

# mtx -f /dev/sg4 status
    Storage Changer /dev/sg4:1 Drives, 8 Slots ( 0 Import/Export )
Data Transfer Element 0:Full (Storage Element 4 Loaded):VolumeTag =
CMR921L6
        Storage Element 1:Full :VolumeTag=CMR904L6
        Storage Element 2:Full :VolumeTag=CMR933L6
        Storage Element 3:Full :VolumeTag=CMR902L6
        Storage Element 4:Empty
        Storage Element 5:Full :VolumeTag=ARC954L6
        Storage Element 6:Full :VolumeTag=ARC946L6
        Storage Element 7:Full :VolumeTag=ARC943L6
        Storage Element 8:Full :VolumeTag=ARC939L6

It says data transfer element full with the tape from slot 4. Is that 
still the current status? Maybe there is a tape stuck in the robot's 
tape changer!


I suggest doing
mtx -f /dev/sg4 status
See what it says now. Maybe it was in the middle of moving the tape, but 
if it still says that, then the tape might be stuck.


Also,

mtx: Request Sense: Error Code=70 (Current)
mtx: Request Sense: Sense Key=Illegal Request
...
mtx: Request Sense: Additional Sense Code = 53
mtx: Request Sense: Additional Sense Qualifier = 03


Chatgpt 4 says that this error code with qualifying sense codes means 
the tape library believes it's physically impossible to remove the 
media. Usually caused by mechanical issues, misalignment, jammed media, 
or physically damaged tape or drive. Maybe a sticker came off the tape 
and it's jammed?


Chatgpt 4:
"MTX Load/Unload Failure: The mtx command failure with the sense key 
"Illegal Request" and the additional sense code of 53 03 indicates a 
"Media load or eject failed". This usually happens because the tape 
drive believes it is physically impossible to load or unload the tape, 
potentially due to mechanical issues, a misalignment, or a physically 
damaged tape or drive."


I am unable to find a cross reference to validate chatgpt's claim about 
the meaning of the error code. On my phone right now, so limited access 
to systems I administer.


Thanks, Rob, for all your feedback.

It's getting late here already and I spent all day around this.

I can't check things on site, I am a few hundred kms away from that 
installation, and the admin there gets back tomorrow morning.


Still trying to get at least one tape labelled for the daily jobs to run

I could label it, then I try to mount it:

*mount
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Automatically selected Storage: HP-Autoloader
Enter autochanger slot: 1
3304 Issuing autochanger "load Volume , Slot 1, Drive 0" command.
3305 Autochanger "load Volume , Slot 1, Drive 0", status is OK.
[SE0203] The Volume= on device="HP-Ultrium" (/dev/nst0) appears to be 
unlabeled.
3902 Cannot mount Volume on Storage Device ""HP-Ultrium" (/dev/nst0)" 
because:
Read label block failed: requested Volume "" on Tape device "HP-Ultrium" 
(/dev/nst0) is not a Bacula labeled Volume, because: ERR=[SE0203] The 
Volume= on device="HP-Ultrium" (/dev/nst0) appears to be unlabeled.

3905 Device ""HP-Ultrium" (/dev/nst0)" open but no Bacula volume is mounted.
If this is not a blank tape, try unmounting and remounting the Volume.

So I am caught in some strange loop here.

-

"update slots" in bacularis:


Device "HP-Autoloader" has 8 slots.
Connecting to Storage daemon HP-Autoloader at samba:9103 ...
3306 Issuing autochanger "list" command.
Catalog record for Volume "CMR904L6" is up to date.
Catalog record for Volume "CMR933L6" is up to date.
Volume "CMR902L6" not found in catalog. Slot=4 InChanger set to zero.
Catalog record for Volume "ARC954L6" is up to date.
Catalog record for Volume "ARC946L6" is up to date.
Catalog record for Volume "ARC943L6" is up to date.
Catalog record for Volume "ARC939L6" is up to date.
quit

-

the whole loader was rebooted multiple times

the admin removed all tapes and reloaded the magazines

ran cleaning tape a few times

we see "media attention" in the WebGUI sometimes, but I can't tell what 
that means ...


thanks. getting tired and hungry also ...





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


Re: [Bacula-users] HP 1/8 G2 Autoloader

2024-05-07 Thread Stefan G. Weichinger

Am 07.05.24 um 17:04 schrieb Stefan G. Weichinger:


Could it be related to something like blocksizes?

These tapes were used with Amanda before.

trying another tape now


I really get lost here. Wanted to re-label a tape to start over:

# systemctl stop  bacula-sd
# mt -f /dev/st0 rewind
# mt -f /dev/st0 weof
/dev/st0: Input/output error
mt: The tape is write-protected.

The physical "slider" is set to non-protected.



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


Re: [Bacula-users] HP 1/8 G2 Autoloader

2024-05-07 Thread Stefan G. Weichinger



more info:

restarted daemons

entered bconsole

mounted a slot, labelled the tape

Catalog record for Volume "CMR921", Slot 4  successfully created.
Requesting to mount HP-Autoloader ...
3001 Device ""HP-Ultrium" (/dev/nst0)" is mounted with Volume "CMR921"

started a (test) job to backup the catalog

Device status:
Autochanger "HP-Autoloader" with devices:
   "HP-Ultrium" (/dev/nst0)

Device Tape: "HP-Ultrium" (/dev/nst0) open but no Bacula volume is 
currently mounted.

Total Bytes Read=0 Blocks Read=0 Bytes/block=0
Positioned at File=0 Block=0
   Device is being initialized.
   Slot 4 is loaded in drive 0.
==


Used Volume status:
Reserved volume: CMR921 on Tape device "HP-Ultrium" (/dev/nst0)
Reader=0 writers=0 reserves=1 volinuse=1 worm=0

WHY?

--

"07-Mai 16:59 samba-dir JobId 846: Connected to Client "samba-fd" at 
samba:9102 with TLS

07-Mai 16:59 samba-fd JobId 846: Connected to Storage at samba:9103 with TLS
07-Mai 17:02 samba-sd JobId 846: Error: [SE0203] The Volume=CMR921 on 
device="HP-Ultrium" (/dev/nst0) appears to be unlabeled."


--

Could it be related to something like blocksizes?

These tapes were used with Amanda before.

trying another tape now



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


[Bacula-users] HP 1/8 G2 Autoloader

2024-05-07 Thread Stefan G. Weichinger

On the weekend I tried to use a "weekly" pool for a set of full backups.

It failed with a tape error and since then we fail to get on track again.

Multiple reboots of the library, change of tapes, relabeling etc

I try for example to stop all bacula-services and unload a tape:


# mtx -f /dev/sg4 unload
Unloading drive 0 into Storage Element 4...mtx: Request Sense: Long 
Report=yes

mtx: Request Sense: Valid Residual=no
mtx: Request Sense: Error Code=70 (Current)
mtx: Request Sense: Sense Key=Illegal Request
mtx: Request Sense: FileMark=no
mtx: Request Sense: EOM=no
mtx: Request Sense: ILI=no
mtx: Request Sense: Additional Sense Code = 53
mtx: Request Sense: Additional Sense Qualifier = 03
mtx: Request Sense: BPV=no
mtx: Request Sense: Error in CDB=no
mtx: Request Sense: SKSV=no
MOVE MEDIUM from Element Address 1 to 1004 Failed


# mtx -f /dev/sg4 status
  Storage Changer /dev/sg4:1 Drives, 8 Slots ( 0 Import/Export )
Data Transfer Element 0:Full (Storage Element 4 Loaded):VolumeTag = 
CMR921L6

  Storage Element 1:Full :VolumeTag=CMR904L6
  Storage Element 2:Full :VolumeTag=CMR933L6
  Storage Element 3:Full :VolumeTag=CMR902L6
  Storage Element 4:Empty
  Storage Element 5:Full :VolumeTag=ARC954L6
  Storage Element 6:Full :VolumeTag=ARC946L6
  Storage Element 7:Full :VolumeTag=ARC943L6
  Storage Element 8:Full :VolumeTag=ARC939L6


If I enter the WebGUI and try the Move there:

"ir drive media removal prevented by host - code 45"

The drive shows "Media Removal:Prevented" in the WebGUI.

Why that? Does Bacula do that? How to overcome that?

I promise to google as well .. I just ask here to get things going asap, 
thanks!



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


Re: [Bacula-users] Wildfile

2024-04-15 Thread Stefan G. Weichinger

Am 11.04.24 um 07:49 schrieb 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. :)


Understandable ;-)



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? :)


Sure. So far it seems to work. At least I see other things to learn now 
... as I get used to 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?

Will do tmrw

Sounds as if I should add these lines asap.


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. :)


Right now I don't know if I might need them. But I always like to learn.




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


[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


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

2024-04-09 Thread Stefan G. Weichinger

Am 09.04.24 um 08:38 schrieb Marcin Haba:

Hello Stefan,

Yes, filenames displayed in the restore process.

Also it might be good to check how the names are stored in the database 
in the File table if everything is fine there.


will try that in an hour or so.

currently editing Jobs and doing initial Full runs to test them

Let me ask something not related to umlauts here:

In Amanda I had "disk list entries" defined, one per Samba-share to 
backup ... and one for each virtual machine dump located on a samba 
share: Veeam dumps to a samba share, I let amanda and now bacula read 
that and push to tape.


The idea there is to have many DLEs (=disk list entries) to make use of 
the scheduler there: it creates a dynamic schedule every run and 
combines fulls and incrementals of the DLEs to meet the overall goals 
("create one full backup of this DLE within N days").


I still tend to define more Jobs in Bacula and not do huge Jobs 
containing hundreds of Gigs and multiple VMs in one Job.


That leads to more manual editing ;-) but OK; that's done now at 
migration time.


Is it recommended to use more Jobs? I assume it's quicker and easier to 
handle, for example at restore time etc


Any problems I create by doing so?

Thanks for any pointers here



___
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-09 Thread Stefan G. Weichinger

Am 09.04.24 um 08:04 schrieb Marcin Haba:

Hello Stefan,

I agree with Anders' advice to check Bacula first. Bacula stores file 
names in the database as they are, without interpreting them, no 
encoding conversion. It means that something is wrong on the input when 
names are stored, it will also be wrong on the output when names are get 
from the database.


And would do I check in Bacula?

The display of filenames in the Restore-process?



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


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

2024-04-08 Thread Stefan G. Weichinger



I am in the process of installing and configuring Bacula-13.0.4 and 
Bacularis-2.7.0 on a Debian-12.5 server.


(moving over from using Amanda, I might ask a few questions around that 
soon)


What I noticed: when I access "Restore" in Bacularis, there are files 
displayed with strange chars instead of the correct german special chars 
or "Umlauts".


That's something I would like to get correct from the start.

I installed from the deb-packages and use postgresql as database.

Didn't notice any specific choice of charsets or so.

Does that maybe come from the language I chose for Bacularis?

Right now I have it in english ...

pls advise, thanks, Stefan


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


Re: [Bacula-users] Scheduling example

2024-03-06 Thread Stefan G. Weichinger

Am 06.03.24 um 15:55 schrieb Phil Stracchino:

On 3/6/24 01:58, Stefan G. Weichinger wrote:


As I try to come up with an initial setup for weekly-daily-monthly I
found this:

https://www.bacula.org/13.0.x-manuals/en/main/Automatic_Volume_Recycling.html#SECTION003060

Shouldn't there also be Jobs for Weekly and Monthly?


No, they aren't needed.  Read carefully.  The job "NightlySave" uses the 
schedule "NightlySave", which runs the NightlySave job monthly, weekly 
and daily at Full, Differential and Incremental levels, each to its own 
Pool.


Yes, I noticed that after posting here ;-) thanks


Which Pool to use for the Catalog Backups?


This example doesn't include a catalog backup.  But I run my catalog 
backup to whichever Pool the other jobs for that night use.


Would it work to use the "NightlySave" schedule for the Job 
"CatalogBackup" then?


thanks for your help




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


[Bacula-users] Scheduling example

2024-03-05 Thread Stefan G. Weichinger



As I try to come up with an initial setup for weekly-daily-monthly I 
found this:


https://www.bacula.org/13.0.x-manuals/en/main/Automatic_Volume_Recycling.html#SECTION003060

Shouldn't there also be Jobs for Weekly and Monthly?

Which Pool to use for the Catalog Backups?


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


Re: [Bacula-users] backing up cifs-shares

2024-02-27 Thread Stefan G. Weichinger

Am 27.02.24 um 12:29 schrieb Marcin Haba:

Hello Stefan,

After adding the www-data to the bacula group you need to restart
php-fpm and web server services.

Here you can find more information about possible ways to solve this error:

https://bacularis.app/doc/brief/troubleshooting.html#permission-denied-error-when-saving-bacula-configuration


"chmod 755 /opt/bacula/etc" was missing. Works now, thanks!



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


Re: [Bacula-users] backing up cifs-shares

2024-02-27 Thread Stefan G. Weichinger



It seems to have worked now ... for the first windows-client.

I am in the process of removing the older release and baculum.

Earlier config was in "/etc/bacula", now the path seems to be 
"/opt/bacula/etc"


I moved the configs, adjusted paths ... also in the API Panel.

Things are *read* ok, but now I can't edit configs -> permission errors

-

/opt/bacula# ls -l etc/
insgesamt 28
-rw-rw-r-- 1 bacula bacula 7434 27. Feb 12:11 bacula-dir.conf
-rw-rw-r-- 1 bacula bacula  494 25. Feb 17:36 bacula-fd.conf
-rwxrw-rw- 1 bacula bacula 1136 24. Feb 17:21 bacula-fd.conf.dist
-rw-rw-r-- 1 bacula bacula  952 26. Feb 09:18 bacula-sd.conf
-rw-rw-r-- 1 bacula bacula  270 25. Feb 17:36 bconsole.conf
-rwxrw-rw- 1 bacula bacula  265 24. Feb 17:21 bconsole.conf.dist

The sudo-conf:

# cat /etc/sudoers.d/bacularis-api
Defaults:www-data !requiretty
www-data ALL = (root) NOPASSWD: /usr/bin/bconsole

www-data ALL = (root) NOPASSWD: /opt/bacula/bin/bconsole

www-data ALL = (root) NOPASSWD: /opt/bacula/scripts/mtx-changer

www-data ALL = (root) NOPASSWD: /opt/bacula/bin/bdirjson
www-data ALL = (root) NOPASSWD: /opt/bacula/bin/bsdjson
www-data ALL = (root) NOPASSWD: /opt/bacula/bin/bfdjson
www-data ALL = (root) NOPASSWD: /opt/bacula/bin/bbconsjson

I added "www-data" to the group "bacula" ... (Debian 12.5 here)


When I edit a Fileset and press "Save" ->

 Error Error 1000: Internal error. [Warning] 
file_put_contents(/opt/bacula/etc/bacula-dir.conf): Failed to open 
stream: Permission denied (@line 64 in file 
/usr/share/bacularis/protected/vendor/bacularis/bacularis-common/Common/Modules/ConfigBacula.php).


oh my



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


Re: [Bacula-users] backing up cifs-shares

2024-02-26 Thread Stefan G. Weichinger

Am 26.02.24 um 14:25 schrieb Rob Gerber:
Mixing topics is ok. Better in this case. All the information is in one 
email thread.


fine

I have read that if you use mt to rewind the tape and then write eof to 
the tape (end of file), it will fool bacula into thinking that the tape 
is empty. If you want to wipe the bacula catalog in your postgres 
server, there should be scripts that do this in /opt/bacula/scripts 
(default location, maybe different on debian).


The Mt command is something like
mt -f /dev/yourtapedrive rewind
mt -f /dev/yourtapedrive -write eof
Check the command syntax I only vaguely remember them.


Used that already before, yes, thanks

If not clearing bacula database prob need to purge volumes from catalog 
(or maybe delete). Remember, these commands are dangerous and have sharp 
edges. After using the Mt command may need to relabel tape.


currently a job seems to hang:

26-Feb 18:33 debian1-sd JobId 34: Warning: mount.c:216 Open of Tape 
device "HP-Ultrium4" (/dev/nst0) Volume "Vol07" failed: 
ERR=tape_dev.c:170 Unable to open device "HP-Ultrium4" (/dev/nst0): 
ERR=Kein Medium gefunden


26-Feb 18:43 debian1-sd JobId 34: Warning: mount.c:216 Open of Tape 
device "HP-Ultrium4" (/dev/nst0) Volume "Vol07" failed: 
ERR=tape_dev.c:170 Unable to open device "HP-Ultrium4" (/dev/nst0): 
ERR=Kein Medium gefunden


I don't know why. Tests with "btape" are completely fine.

That Volume seems not to exist on tape but somewhere in the DB or so.

I would expect the software to skip that and look for another usable tape.

Is there a check routine possible *before* starting the job?

It dumps ~120GB data into the spooling area, then detects that the tape 
isn't there and hangs ... when I stop the job, the spooled data is deleted.


How can I fix that? thanks!



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


Re: [Bacula-users] backing up cifs-shares

2024-02-26 Thread Stefan G. Weichinger

Am 24.02.24 um 20:53 schrieb Stefan G. Weichinger:

I was already able to get the windows-client to work by 
upgrading/reinstalling the bacula-server part (basically starting from 
scratch ... didn't matter much, but was a bit of work).


The server was older than the client, that seems to have lead to the 
mentioned error.


I also took the chance to get rid of baculum and install bacularis.


The windows-client part seems to work now, but by "losing" my 
postgres-DB/catalog in the process of upgrading/reinstalling I have 
issues with the tapes/volumes.


Is there a fast way to start from scratch? I re-labelled volumes, 
updated slots, edited tapes to status "Append" etc, but Bacula seems 
confused by the tapes ;-)


Stuff like this right now:



26-Feb 12:39 debian1-sd JobId 31: Volume "08L4" previously written, 
moving to end of data.

26-Feb 12:41 debian1-sd JobId 31: Warning: For Volume "08L4":
The number of files mismatch! Volume=4 Catalog=3
Correcting Catalog
26-Feb 12:41 debian1-sd JobId 31: New volume "08L4" mounted on 
device "HP-Ultrium4" (/dev/nst0) at 26-Feb-2024 12:41.
26-Feb 12:41 debian1-sd JobId 31: Error: Backspace record at EOT failed. 
ERR=Eingabe-/Ausgabefehler
26-Feb 12:41 debian1-sd JobId 31: End of medium on Volume "08L4" 
Bytes=53,687,079,936 Blocks=0 at 26-Feb-2024 12:41.
26-Feb 12:41 debian1-sd JobId 31: 3307 Issuing autochanger "unload 
Volume 08L4, Slot 2, Drive 0" command.
26-Feb 12:45 debian1-sd JobId 31: 3304 Issuing autochanger "load Volume 
09L4, Slot 3, Drive 0" command.
26-Feb 12:46 debian1-sd JobId 31: 3305 Autochanger "load Volume 
09L4, Slot 3, Drive 0", status is OK.
26-Feb 12:46 debian1-sd JobId 31: Volume "09L4" previously written, 
moving to end of data.


I have to add that I edited MaximumFileSize from 20GB to 2GB after 
reading the info. Maybe the tapes I wrote with the larger value aren't 
"compatible" now anymore?


Sorry for mixing topics and asking FAQs ... still learning many details.



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


Re: [Bacula-users] backing up cifs-shares

2024-02-24 Thread Stefan G. Weichinger

Am 24.02.24 um 03:07 schrieb Rob Gerber:

Hello Stefan!

I have a server that I back up via bacula that I can only access via 
SMB. It is a high-end NAS appliance running gentoo linux, with 
absolutely no shell access by anyone but the vendor who provides it. The 
appliance does its job well, but I have no ability to run an FD on it, 
nor should I since it is a highly tuned and customized environment. As 
such, I back it up via SMB to LTO-8. This works fairly well.


[..]

Rob, thanks for that long and detailed reply. It will take me some time 
to work through it and understand all the details.


I was already able to get the windows-client to work by 
upgrading/reinstalling the bacula-server part (basically starting from 
scratch ... didn't matter much, but was a bit of work).


The server was older than the client, that seems to have lead to the 
mentioned error.


I also took the chance to get rid of baculum and install bacularis.

Looks quite good already, the first job is running.

thanks so far!




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


Re: [Bacula-users] backing up cifs-shares

2024-02-23 Thread Stefan G. Weichinger

Am 23.02.24 um 09:50 schrieb Stefan G. Weichinger:


I am still learning my way to use bacula and could need some explanations.


In the meantime I learned there is a Windows client ;-)


installed it, added client definition to the server, edited client conf ...

I see the client and its status on the server

When I start a job I get this ->



 Non-fatal FD errors:1
  SD Errors:  0
  FD termination status:  Error
  SD termination status:  Waiting on FD
  Termination:*** Backup Error ***
debian1-dir JobId 140: Fatal error: No Job status returned from FD.
debian1-dir JobId 140: Fatal error: Bad response to Storage command: 
wanted 2000 OK storage
, got 2800 End Job TermCode=102 JobFiles=0 ReadBytes=0 JobBytes=0 
Errors=1 VSS=1 Encrypt=0 CommBytes=79 CompressCommBytes=79
s01-fd JobId 140: Fatal error: filed/hello.c:191 Bad caps from SD: auth 
cram-md5 <133970927.1708705086@debian1-sd> ssl=0

.
debian1-dir JobId 140: Using Device "HP-Ultrium4" to write.
debian1-dir JobId 140: Start Backup JobId 140, 
Job=s01-windows-client.2024-02-23_17.18.03_47



Is that a mismatch? Server not using SSL, client trying to?

tia


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


[Bacula-users] backing up cifs-shares

2024-02-23 Thread Stefan G. Weichinger



I am still learning my way to use bacula and could need some explanations.

One goal of my customer is to backup an old Windows Server VM with ~15 
shares.


My bacula-server is a Debian-VM with bacula-13.0.3, and baculum-11.0.6

I have a config running, writing to a HP changer with 8 tapes etc

My current approach:

I have a JobDef for that server, with pre/post-scripts to mount the 
share "C$" (kind of a catchall-approach for the start):



JobDefs {
  Name = "Server_S01"
  Type = "Backup"
  Level = "Incremental"
  Messages = "Standard"
  Storage = "loader1"
  Pool = "Default"
  Client = "debian1-fd"
  Fileset = "S01_Set1"
  Schedule = "WeeklyCycle"
  WriteBootstrap = "/var/lib/bacula/%c.bsr"
  SpoolAttributes = yes
  Runscript {
RunsWhen = "Before"
RunsOnClient = no
Command = "/etc/bacula/scripts/cifs_mount_s01.sh"
  }
  Runscript {
RunsWhen = "After"
RunsOnClient = no
Command = "/usr/bin/umount /mnt/bacula/s01/c_dollar"
  }
  Priority = 10
}

# fstab

//192.168.0.11/C$  /mnt/bacula/s01/c_dollar cifs 
ro,_netdev,users,noauto,credentials=/var/lib/bacula/.smbcreds_s01 0 0


# scripts/cifs_mount_s01.sh

/usr/bin/mountpoint -q /mnt/bacula/s01/c_dollar || /usr/sbin/mount.cifs 
//192.168.x.y/C$ /mnt/bacula/s01/c_dollar  -o 
credentials=/var/lib/bacula/.smbcreds_s01



A Fileset, that doesn't look very elegant to me. I edited it for privacy 
.. you get the picture:


Fileset {
  Name = "S01_Set1"
  Include {
File = "/mnt/bacula/s01/c_dollar/A"
File = "/mnt/bacula/s01/c_dollar/B"
File = "/mnt/bacula/s01/c_dollar/C"
Options {
  Signature = "Md5"
}
  }
  Exclude {
File = "/mnt/bacula/s01/c_dollar/Backu*"
File = "/mnt/bacula/s01/c_dollar/Dokumente*"
File = "/mnt/bacula/s01/c_dollar/pagefile.sys"
File = "/mnt/bacula/s01/c_dollar/Prog*"
File = "/mnt/bacula/s01/c_dollar/Reco*"
File = "/mnt/bacula/s01/c_dollar/System*"
File = "/mnt/bacula/s01/c_dollar/Windows"
File = "/mnt/bacula/s01/c_dollar/WSUS"
  }
}

--

Is that OK or is there a more elegant way to do this?

The Job runs right now, and copies files, OK

My CIFS-user should have admin rights, but for example I seem not to 
have read permissions when doing this:


# ls /mnt/bacula/s01/c_dollar/A

I let the job finish and check contents of backups later in the GUI.

Sure, that's more of a Samba/CIFS-question -> permissions of users. 
Maybe we should add my user to the various shares as a read-user via 
ACLs or so.


Being member of admins seems not enough.

-

I'd appreciate suggestions how to backup multiple CIFS-shares.

One job per share? I would need pre/post-scripts for each of them?

thanks in advance! Stefan







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


Re: [Bacula-users] Autochanger and Baculum

2024-02-06 Thread Stefan G. Weichinger

I think I found the issue:

the execute-permission was missing on "/etc/bacula"

I can unload tapes now from baculum.

testing things now

I hope I haven't broken anything by editing everything ;-)

thanks, Stefan


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


Re: [Bacula-users] Autochanger and Baculum

2024-02-06 Thread Stefan G. Weichinger

sorry for "flooding"

I just want to provide as much details as possible


*mount
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Automatically selected Storage: loader1
Enter autochanger slot: 2
3991 Bad autochanger "loaded? drive 0" command: ERR=Keine Berechtigung.
Results=
3991 Bad autochanger "loaded? drive 0" command: ERR=Keine Berechtigung.
Results=
3991 Bad autochanger "loaded? drive 0" command: ERR=Keine Berechtigung.
Results=
3991 Bad autochanger "loaded? drive 0" command: ERR=Keine Berechtigung.
Results=
3304 Issuing autochanger "load Volume , Slot 2, Drive 0" command.
3992 Bad autochanger "load Volume  Slot 2, Drive 0": ERR=Keine Berechtigung.
Results=
3991 Bad autochanger "loaded? drive 0" command: ERR=Keine Berechtigung.
Results=
3001 Mounted Volume: Vol002
3001 Device ""HP-Ultrium4" (/dev/tape/by-id/scsi-350014380032d5e61-nst)" 
is already mounted with Volume "Vol002"


strange

-

current config:

# bacula-sd.conf

Device {
  Name = "HP-Ultrium4"
  MediaType = "LTO-4"
  ArchiveDevice = "/dev/tape/by-id/scsi-350014380032d5e61-nst"
  RemovableMedia = yes
  RandomAccess = no
  LabelMedia = yes
  AlwaysOpen = yes
  Autochanger = yes
  MaximumFileSize = 200
}

Autochanger {
  Name = "HP-Autoloader"
  Description = "HP 1x8 G2 AUTOLDR"
  Device = "HP-Ultrium4"
  ChangerDevice = "/dev/tape/by-id/scsi-350014380032d5e60-changer"
  ChangerCommand = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
}


# bacula-dir.conf

Storage {
  Name = "loader1"
  SdPort = 9103
  Address = "localhost"
  Password = "EkcGgtnIijvclGBT6fTwbT44bk5n-jKp8"
  Device = "HP-Ultrium4"
  MediaType = "LTO-4"
  Autochanger = yes
  MaximumConcurrentJobs = 10
}



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


Re: [Bacula-users] Autochanger and Baculum

2024-02-06 Thread Stefan G. Weichinger

I edited the names and the device-names:

Device {
  Name = "HP-Ultrium4"
  MediaType = "LTO-4"
  DeviceType = "Tape"
  ArchiveDevice = "/dev/tape/by-id/scsi-350014380032d5e61-nst"
  LabelMedia = yes
  AlwaysOpen = yes
  Autochanger = yes
  MaximumFileSize = 200
}
Autochanger {
  Name = "HP-Autoloader"
  Description = "HP 1x8 G2 AUTOLDR"
  Device = "HP-Ultrium4"
  ChangerDevice = "/dev/tape/by-id/scsi-350014380032d5e60-changer"
  ChangerCommand = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
}

# lsscsi -g
[0:0:0:0]diskVMware   Virtual disk 2.0   /dev/sda   /dev/sg0
[1:0:0:0]tapeHP   Ultrium 4-SCSI   U62W  /dev/st0   /dev/sg2
[1:0:0:1]mediumx HP   1x8 G2 AUTOLDR   4.80  /dev/sch0  /dev/sg3
[4:0:0:0]cd/dvd  NECVMWar VMware SATA CD00 1.00  /dev/sr0   /dev/sg1

/etc/bacula/scripts/mtx-changer /dev/sg3 slots
8


# /usr/sbin/bconsole
Connecting to Director localhost:9101
1000 OK: 103 debian1-dir Version: 9.6.7 (10 December 2020)
Enter a period to cancel a command.
*status slots
Automatically selected Storage: HP-Autoloader
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Connecting to Storage daemon HP-Autoloader at localhost:9103 ...
3306 Issuing autochanger "slots" command.
Device "HP-Autoloader" has 0 slots.
No slots in changer to scan.






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


[Bacula-users] Autochanger and Baculum

2024-02-06 Thread Stefan G. Weichinger



I try to set up a HP 1x8 Changer and an LTO drive.

I defined it in

* bacula-sd.conf

Device {
  Name = "HP-LTO7"
  MediaType = "LTO-4"
  DeviceType = "Tape"
  ArchiveDevice = "/dev/nst0"
  LabelMedia = yes
  AlwaysOpen = yes
  Autochanger = yes
  MaximumFileSize = 200
}
Autochanger {
  Name = "HP Autoloader"
  Description = "HP 1x8 Autoloader"
  Device = "HP-LTO7"
  ChangerDevice = "/dev/tape/by-id/scsi-350014380032d5e60-changer"
  ChangerCommand = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
}

and in

* bacula-dir.conf


Storage {
  Name = "HP Autoloader"
  SdPort = 9103
  Address = "localhost"
  Password = "x"
  Device = "HP Autoloader"
  MediaType = "LTO-4"
  Autochanger = yes
  MaximumConcurrentJobs = 10
}


That works, backups write and restores read from tapes!


I want to be able to manage the autochanger in Baculum-11.0.6, so I 
tried to copy the cfg from bacula-dir.


Currently I even see the drive and the Changer slots in baculum, but for 
example I cannot "Unload" the current tape. Why?


# cat /etc/bacula/baculum/Config-api-apache/devices.conf

[HP-LTO7]
type = "device"
device = "/dev/nst0"
index = "0"

[HP Autoloader]
type = "autochanger"
device = "/dev/tape/by-id/scsi-350014380032d5e60-changer"
command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
use_sudo = "1"
drives = "HP-LTO7"


My understanding is:

configure bacula-sd, then bacula-dir, test via bconsole

then proceed to copy the config into baculum

This is a debian-12.4 host with bacula from the debian repos, and 
baculum from "http://www.bacula.org/downloads/baculum/stable-11/debian;




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


Re: [Bacula-users] newbie: errors in baculum

2024-01-27 Thread Stefan G. Weichinger

Am 26.01.24 um 21:01 schrieb Marcin Haba:

Hello Stefan,

Yes, for PostgreSQL 15 you need this patch. It should still be valid.

At the moment Bacula GitLab stopped working so I am sending the patch
in attachment. It is a one line patch.

After applying it, the TDbCommand error should not occur anymore.


correct, thanks! Yours is a different patch than the one I had found.
GUI works now, I can proceed learning and configuring ...



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


Re: [Bacula-users] newbie: errors in baculum

2024-01-25 Thread Stefan G. Weichinger

seems I hit this:

https://www.mail-archive.com/bacula-users@lists.sourceforge.net/msg72759.html

Is it advised to use bacularis instead now?


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


Re: [Bacula-users] newbie: errors in baculum

2024-01-25 Thread Stefan G. Weichinger

Am 25.01.24 um 11:58 schrieb Stefan G. Weichinger:


"Error code: 1000

Message: Internal error. TDbCommand failed to execute the query SQL " 
SELECT conname, consrc, contype, "


Googled that, unsure about it.



I find 
https://www.mail-archive.com/search?l=bacula-users@lists.sourceforge.net=subject:%22Re%5C%3A+%5C%5BBacula%5C-users%5C%5D+Baculum+api+installs%2C+but+throws+Error+1000%22=newest=1


but the linked PR/patch seems not to match exactly ... it's 3 yrs old so 
I assume it's not valid anymore in my environment.


This is PostgreSQL-15.5 (Debian 15.5-0+deb12u1)


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


[Bacula-users] newbie: errors in baculum

2024-01-25 Thread Stefan G. Weichinger



greetings, bacula-users

I am a complete starter with bacula and test things in a Debian 12.4 
machine.


I can write to and read from tape already, using an autochanger ... 
looks good already.


I maybe have a "mixed" setup: at first I installed from the debian 
repos, then I found the specific bacula repos for Debian.


Which repos to use for bacula and bookworm?

I added baculum:

# cat /etc/apt/sources.list.d/baculum.list
deb http://www.bacula.org/downloads/baculum/stable-11/debian bullseye main
deb-src http://www.bacula.org/downloads/baculum/stable-11/debian 
bullseye main


and was able to set up API and web ... although in the baculum-GUI I get 
database-related errors like:


"Error code: 1000

Message: Internal error. TDbCommand failed to execute the query SQL " 
SELECT conname, consrc, contype, "


Googled that, unsure about it.

Do I maybe have a too old DB now, coming from bacula-9.6?
Is it compatible at all?

Should I somehow upgrade bacula?

Should I start from scratch?

pls advise, thanks in advance, Stefan


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