View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001482 | bareos-core | director | public | 2022-09-20 17:35 | 2022-10-06 17:43 |
Reporter | Jacky44 | Assigned To | bruno-at-bareos | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | Linux | OS | Debian | OS Version | 10 |
Product Version | 21.1.4 | ||||
Summary | 0001482: A restore job definition is not respected when restoring (Storage field) | ||||
Description | Hello, I have a definition of a restore job, but this definition is not use to restore the job as you can see at the end of this message : Storage: File-SC-CAP-samba-cap-sd1 instaed of : Storage = File-SC-DAF-samba-daf-sd1 Jacky | ||||
Steps To Reproduce | *rest The defined Catalog resources are: 1: MyCatalog-1 2: MyCatalog-2 Select Catalog resource (1-2): 1 Using Catalog "MyCatalog-1" First you select one or more JobIds that contain files to be restored. You will be presented several methods of specifying the JobIds. Then you will be allowed to select which files from those JobIds are to be restored. To select the JobIds, you have the following choices: 1: List last 20 Jobs run 2: List Jobs where a given File is saved 3: Enter list of comma separated JobIds to select 4: Enter SQL list command 5: Select the most recent backup for a client 6: Select backup for a client before a specified time 7: Enter a list of files to restore 8: Enter a list of files to restore before a specified time 9: Find the JobIds of the most recent backup for a client 10: Find the JobIds for a backup for a client before a specified time 11: Enter a list of directories to restore for found JobIds 12: Select full restore to a specified Job date 13: Cancel Select item: (1-13): 5 Defined Clients: 1: SC-AC-samba-ac-fd 2: SC-ACN-samba-acn-fd 3: SC-ARCHIVES-samba-archives-fd 4: SC-CAB-samba-cab-fd 5: SC-CAP-samba-cap-fd 6: SC-CCP-samba-ccp-fd 7: SC-CDP-samba-cdp-fd 8: SC-COM-samba-com-fd 9: SC-CPUN-samba-cpun-fd 10: SC-CRSU-samba-crsu-fd 11: SC-DAF-samba-daf-fd 12: SC-DAJ-C2AI-samba-daj-c2ai-fd 13: SC-DCI-samba-dci-fd 14: SC-DDSPS-samba-ddsps-fd 15: SC-DEI-samba-dei-fd 16: SC-DEVU-samba-devu-fd 17: SC-DGS-samba-dgs-fd 18: SC-DIR-samba-dir-fd 19: SC-DPIL-samba-dpil-fd 20: SC-DRHDS-samba-drhds-fd 21: SC-DRPI-samba-drpi-fd 22: SC-DSIN-samba-dsin-fd 23: SC-DSIN-samba-ticem-fd 24: SC-DVE-samba-dve-fd 25: SC-MTE-samba-mte-fd 26: SC-NEXT-samba-next-fd 27: SC-REFORME-samba-reforme-fd 28: SC-SUAPS-samba-suaps-fd 29: SC-SUMPPS-samba-sumpps-fd 30: bareos-fd 31: bareos-webui-fd 32: samba-dsin.univ-nantes.prive-fd 33: samba-sumpps-fd Select the Client (1-33): 11 Automatically selected FileSet: Set-SC-DAF-samba-daf +-------+-------+----------+-----------------+---------------------+----------------------------------+ | jobid | level | jobfiles | jobbytes | starttime | volumename | +-------+-------+----------+-----------------+---------------------+----------------------------------+ | 2,695 | F | 408,442 | 269,701,028,611 | 2022-09-16 23:55:01 | V_Complete-SC-DAF-samba-daf-1118 | | 2,695 | F | 408,442 | 269,701,028,611 | 2022-09-16 23:55:01 | V_Complete-SC-DAF-samba-daf-1119 | | 2,695 | F | 408,442 | 269,701,028,611 | 2022-09-16 23:55:01 | V_Complete-SC-DAF-samba-daf-1120 | | 2,755 | I | 4 | 760,300 | 2022-09-18 23:55:01 | V_I-SC-DAF-samba-daf-1484 | | 2,786 | I | 359 | 76,405,166 | 2022-09-19 23:55:00 | V_I-SC-DAF-samba-daf-1502 | +-------+-------+----------+-----------------+---------------------+----------------------------------+ You have selected the following JobIds: 2695,2755,2786 Building directory tree for JobId(s) 2695,2755,2786 ... ++++++++++++++++++++++++++++++++++++++++++++ 361,023 files inserted into the tree. You are now entering file selection mode where you add (mark) and remove (unmark) files to be restored. No files are initially added, unless you used the "all" keyword on the command line. Enter "done" to leave this mode. cwd is: / $ ls DATA/ $ cd /DATA/ cwd is: /DATA/ $ ls DAF/ DAF-TELEPHONIE/ $ cd DAF-TELEPHONIE/ cwd is: /DATA/DAF-TELEPHONIE/ $ ls FACTURATION DES MOBILES/ FACTURATION LIGNES FIXES/ $ cd "FACTURATION LIGNES FIXES" cwd is: /DATA/DAF-TELEPHONIE/FACTURATION LIGNES FIXES/ $ ls Facturation Lignes Fixe-2014/ Facturation Lignes Fixes-2015/ Facturation Lignes Fixes-2016/ Facturation Lignes Fixes-2017/ Facturation Lignes Fixes-2018/ Facturation Lignes Fixes-2019/ $ cd "Facturation Lignes Fixe-2014/" cwd is: /DATA/DAF-TELEPHONIE/FACTURATION LIGNES FIXES/Facturation Lignes Fixe-2014/ $ ls FACTURATION C/ FACTURATION O/ SUIVI TAXATION T/ $ cd "FACTURATION C/" cwd is: /DATA/DAF-TELEPHONIE/FACTURATION LIGNES FIXES/Facturation Lignes Fixe-2014/FACTURATION C/ $ ls facture-c-2014.ods facture-c-2014.pdf $ mark facture-c-2014.pdf 1 file marked. $ done The defined Restore Job resources are: 1: RestoreFiles 2: SET-SC-DAF-samba-daf-RestoreFiles Select Restore Job (1-2): 2 Bootstrap records written to /var/lib/bareos/bareos-1-dir.restore.1.bsr The job will require the following Volume(s) Storage(s) SD Device(s) =========================================================================== V_Complete-SC-DAF-samba-daf-1120 File-SC-CAP-samba-cap-sd1 FileStorage-SC-CAP-samba-cap Volumes marked with "*" are online. 1 file selected to be restored. Using Catalog "MyCatalog-1" Run Restore job JobName: SET-SC-DAF-samba-daf-RestoreFiles Bootstrap: /var/lib/bareos/bareos-1-dir.restore.1.bsr Where: /DATA/tmp/bareos Replace: Always FileSet: Set-SC-DAF-samba-daf Backup Client: SC-DAF-samba-daf-fd Restore Client: SC-DAF-samba-daf-fd Format: Native Storage: File-SC-CAP-samba-cap-sd1 When: 2022-09-20 17:19:41 Catalog: MyCatalog-1 Priority: 20 Plugin Options: *None* OK to run? (yes/mod/no): | ||||
Additional Information | Job { Name = "SET-SC-DAF-samba-daf-RestoreFiles" Description = "Standard Restore template. Only one such job is needed for all standard Jobs/Clients/Storage ..." Type = Restore Client = SC-DAF-samba-daf-fd FileSet = "Set-SC-DAF-samba-daf" # selftest fileset (0000013) Storage = File-SC-DAF-samba-daf-sd1 Pool = Complete-SC-DAF-samba-daf Messages = Standard-JC Priority = 20 Where = /DATA/tmp/bareos } | ||||
Tags | restore, storage | ||||
Hello, I'm sorry to inform you that there's no real restore definition like the jobdef resource. There's one job restore defined by default to ease the selection and propose some default like a dummy fileset and the where to restore. But most of all other field will be replaced by the one used during the backup. It doesn't make sense either to force a storage, Bareos will use the one able to handle the media. For example restoring the most recent for a client/job will often imply one Full media and several incremental that can be handle by different storage. I hope this help you to better understand the software. |
|
Hello, I understand, but the problem is that it is possible to change the Storage with bconsole and restore command, but it is not possible with bareos-webui, because storage is not a proposed field. Jacky $ done The defined Restore Job resources are: 1: RestoreFiles 2: SET-SC-DAF-samba-daf-RestoreFiles Select Restore Job (1-2): 2 Bootstrap records written to /var/lib/bareos/bareos-1-dir.restore.2.bsr The job will require the following Volume(s) Storage(s) SD Device(s) =========================================================================== V_Complete-SC-DAF-samba-daf-1120 File-SC-CAP-samba-cap-sd1 FileStorage-SC-CAP-samba-cap Volumes marked with "*" are online. 16 files selected to be restored. Using Catalog "MyCatalog-1" Run Restore job JobName: SET-SC-DAF-samba-daf-RestoreFiles Bootstrap: /var/lib/bareos/bareos-1-dir.restore.2.bsr Where: /DATA/tmp/bareos Replace: Always FileSet: Set-SC-DAF-samba-daf Backup Client: SC-DAF-samba-daf-fd Restore Client: SC-DAF-samba-daf-fd Format: Native Storage: File-SC-CAP-samba-cap-sd1 When: 2022-09-22 14:30:36 Catalog: MyCatalog-1 Priority: 20 Plugin Options: *None* OK to run? (yes/mod/no): |
|
Sorry I don't get your point, Even with bconsole and restore command the storage that will be used is not the one you select DAF, it will be CAP as stated V_Complete-SC-DAF-samba-daf-1120 File-SC-CAP-samba-cap-sd1 FileStorage-SC-CAP-samba-cap Why simply because the important part is the volume where the data are. For example you can also set another fileset, but it will be not be used for restore, fileset, storage are mandatory fields in the concept of job, that why they are here, but just not used. Or is there something I can't see with the extract you made. |
|
You said : Even with bconsole and restore command the storage that will be used is not the one you select DAF, it will be CAP as stated It's ok, and not a big problem, because it is possible to change this fiels in bconsole / rest, by doing mod and choose change Storage. The problem for me is : it is not possible do do the same with bareos-webui, because this field is not showed in the interface as a possible field to be changed. As result, it is not possible to use webui to restore in our configuration, only bconsole is possible, and it's a difficulty because ours restore users have an access to webui only. I hope my Engish is clear enough to explain. |
|
No problem for the english, we use the same accent ;-) What seems to escape you, is that the storage you want to change, will not be used so when you set DAF, as the volume belong to CAP the storage used will be CAP. So there's fundamentally no needs to change it, and that's why we were able to not propose it on the webui to simplify the UI. What would be the use case of changing the storage? |
|
In my case use, I have these definitions : Storage { Name = File-SC-DAF-samba-daf-sd1 Address = bareos-sd1.dprv.univ-nantes.prive Password = "m..........................6" Device = FileStorage-SC-DAF-samba-daf Media Type = File } and Storage { Name = File-SC-CAP-samba-cap-sd1 Address = bareos-sd1.dprv.univ-nantes.prive # N.B. Use a fully qualified name here (do not use "localhost" here). Password = "m..........................6" Device = FileStorage-SC-CAP-samba-cap Media Type = File } So storgae DAF and CAP pointed to the same serveur : bareos-sd1.dprv.univ-nantes.prive But with device defined like this : Device { Name = FileStorage-SC-DAF-samba-daf Media Type = File Archive Device = /var/lib/bareos/storage/SC-DAF-samba-daf LabelMedia = yes; # lets Bareos label unlabeled media Random Access = yes; AutomaticMount = yes; # when device opened, read it RemovableMedia = no; AlwaysOpen = no; Description = "File device. A connecting Director must have the same Name and MediaType." } and Device { Name = FileStorage-SC-CAP-samba-cap Media Type = File Archive Device = /var/lib/bareos/storage/SC-CAP-samba-cap LabelMedia = yes; # lets Bareos label unlabeled media Random Access = yes; AutomaticMount = yes; # when device opened, read it RemovableMedia = no; AlwaysOpen = no; Description = "File device. A connecting Director must have the same Name and MediaType." } We see thet Archive Device are different. If I can't change to the right storgae, and by the way the right device, and the right archive device, bareos answers when I try to restore : Could not open: /var/lib/bareos/storage/SC-CAP-samba-cap/V_Complete-SC-DAF-samba-daf 23-sept. 11:11 bareos-sd1-sd JobId 2905: Please mount read Volume "V_Complete-SC-DAF-samba-daf-1120" for: Job: SET-SC-DAF-samba-daf-RestoreFiles.2022-09-23_11.11.54_26 Storage: "FileStorage-SC-CAP-samba-cap" (/var/lib/bareos/storage/SC-CAP-samba-cap) Pool: Complete-SC-DAF-samba-daf Media type: File * I hope my case use is well explained to show you I need to change the storage (not possible in webui). Jacky |
|
The problem you have is the following When Bareos tell that it will need the following The job will require the following Volume(s) Storage(s) SD Device(s) =========================================================================== V_Complete-SC-DAF-samba-daf-1120 File-SC-CAP-samba-cap-sd1 FileStorage-SC-CAP-samba-cap The following should be where the software has store it (volume,storage,device) because it knows where the data are. From you last example it look like some volume are moved (outside of Bareos?) to another place. list media, pools definition and llist media=V_Complete-SC-DAF-samba-daf-1120 will give more clue about that mix. |
|
Hello, Effectively, all volumes are moved to others storages (I have the same with others jobs), and it's append inside bareos. Because, from a long time, bacula is started with these definitions below. Pehaps confusion because sd bareos is always bareos-sd1.dprv.univ-nantes.prive ? I hope it's not because of my organisation, similar that those I had in bacula, with this include in bareos-dir.conf : ################################################################## ############################ INCLUDE ############################# ################################################################## ################## Serveurs samba centraux ###################### ... @/etc/bareos/bareos-dir.d/include/SC-CAB-samba-cab.conf @/etc/bareos/bareos-dir.d/include/SC-DAF-samba-daf.conf ... ---------------- Storage { Name = File-SC-DAF-samba-daf-sd1 Address = bareos-sd1.dprv.univ-nantes.prive Password = "m...6" Device = FileStorage-SC-DAF-samba-daf Media Type = File } Pool { Name = Complete-SC-DAF-samba-daf Volume Use Duration = 3 weeks Pool Type = Backup Recycle = yes # Bareos can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 2 months # How long should the Full Backups be kept? (0000006) Maximum Volume Bytes = 100G # Limit Volume size to something reasonable Maximum Volumes = 100 # Limit number of Volumes in Pool Label Format = "V_Complete-SC-DAF-samba-daf-" # Volumes will be labeled "Full-<volume-id>" } Pool { Name = Diff-SC-DAF-samba-daf Volume Use Duration = 5 days Pool Type = Backup Recycle = yes # Bareos can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 2 months # How long should the Differential Backups be kept? (0000009) Maximum Volume Bytes = 100G # Limit Volume size to something reasonable Maximum Volumes = 100 # Limit number of Volumes in Pool Label Format = "V_Diff-SC-DAF-samba-daf-" # Volumes will be labeled "Differential-<volume-id>" } Pool { Name = I-SC-DAF-samba-daf Volume Use Duration = 20 hours Pool Type = Backup Recycle = yes # Bareos can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 2 months # How long should the Incremental Backups be kept? (0000012) Maximum Volume Bytes = 100G # Limit Volume size to something reasonable Maximum Volumes = 100 # Limit number of Volumes in Pool Label Format = "V_I-SC-DAF-samba-daf-" # Volumes will be labeled "Incremental-<volume-id>" } *list media=V_Complete-SC-DAF-samba-daf-1120 +---------+----------------------------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+---------------------------+ | mediaid | volumename | volstatus | enabled | volbytes | volfiles | volretention | recycle | slot | inchanger | mediatype | lastwritten | storage | +---------+----------------------------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+---------------------------+ | 1,120 | V_Complete-SC-DAF-samba-daf-1120 | Append | 1 | 55,260,062,182 | 12 | 5,184,000 | 1 | 0 | 0 | File | 2022-09-17 04:13:42 | File-SC-CAP-samba-cap-sd1 | +---------+----------------------------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+---------------------------+ * *llist media=V_Complete-SC-DAF-samba-daf-1120 mediaid: 1,120 volumename: V_Complete-SC-DAF-samba-daf-1120 slot: 0 poolid: 62 pool: Complete-SC-DAF-samba-daf mediatype: File firstwritten: 2022-09-16 23:55:01 lastwritten: 2022-09-17 04:13:42 labeldate: 2022-09-16 23:55:01 voljobs: 1 volfiles: 12 volblocks: 856,586 volmounts: 1 volbytes: 55,260,062,182 volerrors: 0 volwrites: 856,587 volcapacitybytes: 0 volstatus: Append enabled: 1 recycle: 1 volretention: 5,184,000 voluseduration: 1,814,400 maxvoljobs: 0 maxvolfiles: 0 maxvolbytes: 107,374,182,400 inchanger: 0 endfile: 12 endblock: 3,720,454,629 labeltype: 0 storageid: 20 deviceid: 0 locationid: 0 recyclecount: 0 initialwrite: scratchpoolid: 0 scratchpool: recyclepoolid: 0 recyclepool: comment: storage: File-SC-CAP-samba-cap-sd1 * *list pools definition +--------+-------------------------------------+---------+---------+----------+----------------------------------------+ | poolid | name | numvols | maxvols | pooltype | labelformat | +--------+-------------------------------------+---------+---------+----------+----------------------------------------+ | 1 | Full | 2 | 100 | Backup | Full- | | 2 | Differential | 0 | 100 | Backup | Differential- | | 3 | Incremental | 0 | 100 | Backup | Incremental- | | 4 | Scratch | 0 | 0 | Scratch | * | ... | 38 | Complete-SC-CAP-samba-cap | 3 | 100 | Backup | V_Complete-SC-CAP-samba-cap- | | 39 | Diff-SC-CAP-samba-cap | 7 | 100 | Backup | V_Diff-SC-CAP-samba-cap- | | 40 | I-SC-CAP-samba-cap | 50 | 100 | Backup | V_I-SC-CAP-samba-cap- | ... | 62 | Complete-SC-DAF-samba-daf | 20 | 100 | Backup | V_Complete-SC-DAF-samba-daf- | | 63 | Diff-SC-DAF-samba-daf | 4 | 100 | Backup | V_Diff-SC-DAF-samba-daf- | | 64 | I-SC-DAF-samba-daf | 21 | 100 | Backup | V_I-SC-DAF-samba-daf- | ... +--------+-------------------------------------+---------+---------+----------+----------------------------------------+ * Jacky |
|
Hello sorry I'm getting confused by that sentence > Effectively, all volumes are moved to others storages (I have the same with others jobs), and it's append inside bareos. How and what definition or job allow that ? |
|
Hello, These definitions delow allow that for example. But in fact all of them for this server bareos-1 : all definitions are defined on the same model. I have others bareos : 2 until 6 that don't have the problem. -------------- bareos@bareos-1:/etc/bareos$ cat bareos-dir.d/include/SC-DAF-samba-daf.conf JobDefs { Name = "Job-SC-DAF-samba-daf" Type = Backup Level = Full Client = SC-DAF-samba-daf-fd FileSet = "Set-SC-DAF-samba-daf" # selftest fileset (0000013) Schedule = "WeeklyCycle-SC-DAF-samba-daf" Storage = File-SC-DAF-samba-daf-sd1 Messages = Standard-JC Pool = Complete-SC-DAF-samba-daf Priority = 20 Write Bootstrap = "/var/lib/bareos/%c.bsr" Full Backup Pool = Complete-SC-DAF-samba-daf # write Full Backups into "Full" Pool (0000005) Differential Backup Pool = Diff-SC-DAF-samba-daf # write Diff Backups into "Differential" Pool (0000008) Incremental Backup Pool = I-SC-DAF-samba-daf # write Incr Backups into "Incremental" Pool (0000011) } Schedule { Name = "WeeklyCycle-SC-DAF-samba-daf" Run = Level=Full Pool=Complete-SC-DAF-samba-daf Messages=Standard-JC 3rd fri at 23:55 Run = Level=Differential Pool=Diff-SC-DAF-samba-daf Messages=Standard-JC 1st 2nd 4th 5th fri at 23:55 Run = Level=Incremental Pool=I-SC-DAF-samba-daf Messages=Standard-JC sat-thu at 23:55 } Job { Name = SC-DAF-samba-daf-job Client = SC-DAF-samba-daf-fd JobDefs = Job-SC-DAF-samba-daf } FileSet { Name = "Set-SC-DAF-samba-daf" # Description = "fileset just to backup some files for selftest" Include { Options { signature = MD5; # compression = GZIP; #Rem JCA : If enabled, tells the Client that the selection of files during Incremental and Differential backups should based only on the st_mtime value in the stat() packet. The default is no which means that the selection of files to be backed up will be based on both the st_mtime and the st_ctime values. mtimeonly = yes; } File = /DATA/DAF File = /DATA/DAF-TELEPHONIE } Exclude { } } Client { Name = SC-DAF-samba-daf-fd Address = 172...58 Password = "F...6" Catalog = MyCatalog-1 File Retention = 2 months Job Retention = 2 months AutoPrune = yes # Prune expired Jobs/Files } Storage { Name = File-SC-DAF-samba-daf-sd1 Address = bareos-sd1.dprv.univ-nantes.prive # N.B. Use a fully qualified name here (do not use "localhost" here). Password = "m...6" Device = FileStorage-SC-DAF-samba-daf Media Type = File } Pool { Name = Complete-SC-DAF-samba-daf Volume Use Duration = 3 weeks Pool Type = Backup Recycle = yes # Bareos can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 2 months # How long should the Full Backups be kept? (0000006) Maximum Volume Bytes = 100G # Limit Volume size to something reasonable Maximum Volumes = 100 # Limit number of Volumes in Pool Label Format = "V_Complete-SC-DAF-samba-daf-" # Volumes will be labeled "Full-<volume-id>" } Pool { Name = Diff-SC-DAF-samba-daf Volume Use Duration = 5 days Pool Type = Backup Recycle = yes # Bareos can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 2 months # How long should the Differential Backups be kept? (0000009) Maximum Volume Bytes = 100G # Limit Volume size to something reasonable Maximum Volumes = 100 # Limit number of Volumes in Pool Label Format = "V_Diff-SC-DAF-samba-daf-" # Volumes will be labeled "Differential-<volume-id>" } Pool { Name = I-SC-DAF-samba-daf Volume Use Duration = 20 hours Pool Type = Backup Recycle = yes # Bareos can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 2 months # How long should the Incremental Backups be kept? (0000012) Maximum Volume Bytes = 100G # Limit Volume size to something reasonable Maximum Volumes = 100 # Limit number of Volumes in Pool Label Format = "V_I-SC-DAF-samba-daf-" # Volumes will be labeled "Incremental-<volume-id>" } Profile { Name = webui-SC-DAF-samba-daf CommandACL = !.bvfs_clear_cache, !.exit, !.sql, !configure, !create, !delete, !purge, !sqlquery, !umount, !unmount, *all* Job ACL = RestoreFiles, SC-DAF-samba-daf-job Schedule ACL = WeeklyCycle-SC-DAF-samba-daf Catalog ACL = MyCatalog-1 Pool ACL = Complete-SC-DAF-samba-daf, Diff-SC-DAF-samba-daf, I-SC-DAF-samba-daf Storage ACL = File-SC-DAF-samba-daf-sd1 Client ACL = SC-DAF-samba-daf-fd FileSet ACL = Set-SC-DAF-samba-daf Where ACL = *all* Plugin Options ACL = *all* } ############################################################### ############################# Restore ######################### ############################################################### Job { Name = "SET-SC-DAF-samba-daf-RestoreFiles" Description = "Standard Restore template. Only one such job is needed for all standard Jobs/Clients/Storage ..." Type = Restore Client = SC-DAF-samba-daf-fd FileSet = "Set-SC-DAF-samba-daf" # selftest fileset (0000013) Storage = File-SC-DAF-samba-daf-sd1 Pool = Complete-SC-DAF-samba-daf Messages = Standard-JC Priority = 20 Where = /DATA/tmp/bareos } ---------------------------------------------- with this general file : bareos@bareos-1:/etc/bareos$ cat bareos-dir.conf Director { # define myself Name = bareos-1-dir QueryFile = "/usr/lib/bareos/scripts/query.sql" Maximum Concurrent Jobs = 10 Password = "7...U" # Console password Messages = Daemon Auditing = yes # Enable the Heartbeat if you experience connection losses # (eg. because of your router or firewall configuration). # Additionally the Heartbeat can be enabled in bareos-sd and bareos-fd. # # Heartbeat Interval = 1 min # remove comment in next line to load dynamic backends from specified directory # Backend Directory = /usr/lib/bareos/backends # remove comment from "Plugin Directory" to load plugins from specified directory. # if "Plugin Names" is defined, only the specified plugins will be loaded, # otherwise all director plugins (*-dir.so) from the "Plugin Directory". # # Plugin Directory = /usr/lib/bareos/plugins # Plugin Names = "" } JobDefs { Name = "DefaultJob" Type = Backup Level = Incremental Client = bareos-fd FileSet = "SelfTest" # selftest fileset (0000013) Schedule = "WeeklyCycle" Storage = File Messages = Standard Pool = Incremental Priority = 20 Write Bootstrap = "/var/lib/bareos/%c.bsr" Full Backup Pool = Full # write Full Backups into "Full" Pool (0000005) Differential Backup Pool = Differential # write Diff Backups into "Differential" Pool (0000008) Incremental Backup Pool = Incremental # write Incr Backups into "Incremental" Pool (0000011) } Job { Name = "RestoreFiles" Description = "Standard Restore template. Only one such job is needed for all standard Jobs/Clients/Storage ..." Type = Restore Client = bareos-fd FileSet = "LinuxAll" # Storage = File Storage = File-sd1 Pool = Incremental Messages = Standard # Where = /tmp/bareos-restores Where = /BAREOS-DATA/bareos-restores } Job { Name = "BackupCatalog" Description = "Backup the catalog database (after the nightly save)" JobDefs = "DefaultJob" Level = Full FileSet="Catalog" Schedule = "WeeklyCycleAfterBackup" # This creates an ASCII copy of the catalog # Arguments to make_catalog_backup.pl are: # make_catalog_backup.pl <catalog-name> #Rem JCA 24/03/22 : RunBeforeJob = "/usr/lib/bareos/scripts/make_catalog_backup.pl MyCatalog-1" # This deletes the copy of the catalog #Rem JCA 24/03/22 : RunAfterJob = "/usr/lib/bareos/scripts/delete_catalog_backup" # This sends the bootstrap via mail for disaster recovery. # Should be sent to another system, please change recipient accordingly Write Bootstrap = "|/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \" -s \"Bootstrap for Job %j\" root@localhost" # (0000001) Priority = 20 # run after main backup } FileSet { Name = "Catalog" Description = "Backup the catalog dump and Bareos configuration files." Include { Options { signature = MD5 } #Rem JCA 24/03/22 : File = "/var/lib/bareos/bareos.sql" # database dump File = "/etc/bareos" # configuration } } FileSet { Name = "LinuxAll" Description = "Backup all regular filesystems, determined by filesystem type." Include { Options { Signature = MD5 # calculate md5 checksum per file One FS = No # change into other filessytems FS Type = btrfs FS Type = ext2 # filesystems of given types will be backed up FS Type = ext3 # others will be ignored FS Type = ext4 FS Type = reiserfs FS Type = jfs FS Type = xfs FS Type = zfs } File = / } # Things that usually have to be excluded # You have to exclude /var/lib/bareos/storage # on your bareos server Exclude { File = /var/lib/bareos File = /var/lib/bareos/storage File = /proc File = /tmp File = /var/tmp File = /.journal File = /.fsck } } FileSet { Name = "SelfTest" Description = "fileset just to backup some files for selftest" Include { Options { Signature = MD5 # calculate md5 checksum per file } File = "/usr/sbin" } } FileSet { Name = "Windows All Drives" Enable VSS = yes Include { Options { Signature = MD5 Drive Type = fixed IgnoreCase = yes WildFile = "[A-Z]:/pagefile.sys" WildDir = "[A-Z]:/RECYCLER" WildDir = "[A-Z]:/$RECYCLE.BIN" WildDir = "[A-Z]:/System Volume Information" Exclude = yes } File = / } } Schedule { Name = "WeeklyCycleAfterBackup" Description = "This schedule does the catalog. It starts after the WeeklyCycle." Run = Full mon-fri at 21:10 } Schedule { Name = "WeeklyCycle" Run = Full 1st sat at 21:00 # (0000004) Run = Differential 2nd-5th sat at 21:00 # (0000007) Run = Incremental mon-fri at 21:00 # (0000010) } Client { Name = bareos-fd Description = "Client resource of the Director itself." Address = localhost Password = "J...s" # password for FileDaemon Catalog = MyCatalog-1 } Storage { Name = File # Address = bareos # N.B. Use a fully qualified name here (do not use "localhost" here). Address = bareos-1.dprv.univ-nantes.prive # N.B. Use a fully qualified name here (do not use "localhost" here). Password = "m...6" Device = FileStorage Media Type = File } Storage { Name = File-sd1 # Address = bareos # N.B. Use a fully qualified name here (do not use "localhost" here). Address = bareos-sd1.dprv.univ-nantes.prive # N.B. Use a fully qualified name here (do not use "localhost" here). Password = "m...6" Device = FileStorage Media Type = File } Catalog { Name = MyCatalog-1 # Uncomment the following lines if you want the dbi driver # dbdriver = "dbi:postgresql"; dbaddress = 127.0.0.1; dbport = #dbdriver = "postgresql" dbname = "bareos" dbuser = "bareos" # dbuser = "root" dbpassword = "xxx" } Catalog { Name=MyCatalog-2 #dbdriver=postgresql dbname=bareos2 dbuser=bareos dbpassword=xxx #dbaddress=bareos-2.dprv.univ-nantes.prive #dbport=5432 } #Catalog { # Name=MyCatalog-3 # #dbdriver=postgresql # dbname=bareos # dbuser=bareos # dbpassword=xxx # #dbaddress=bareos-3.dprv.univ-nantes.prive # #dbport=5432 #} Messages { Name = Daemon Description = "Message delivery for daemon messages (no job)." mailcommand = "/usr/bin/bsmtp -h smtp.univ-nantes.prive -f \"\(Bareos\) \<%r\>\" -s \"Bareos-1 daemon message\" %r" # mail = root@localhost = all, !skipped, !audit # (0000002) mail = jacky.xxx@univ-nantes.fr = all, !skipped, !audit # (0000002) console = all, !skipped, !saved, !audit append = "/var/log/bareos/bareos.log" = all, !skipped, !audit append = "/var/log/bareos/bareos-audit.log" = audit } Messages { Name = Standard Description = "Reasonable message delivery -- send most everything to email address and to the console." # operatorcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos: Intervention needed for %j\" %r" operatorcommand = "/usr/bin/bsmtp -h smtp.univ-nantes.prive -f \"\(Bareos\) \<no-reply@univ-nantes.fr\>\" -s \"Bareos-1: Intervention needed for %j\" %r" # mailcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos: %t %e of %c %l\" %r" mailcommand = "/usr/bin/bsmtp -h smtp.univ-nantes.prive -f \"\(Bareos\) \<no-reply@univ-nantes.fr\>\" -s \"Bareos-1: %t %e of %c %l\" %r" # operator = root@localhost = mount # (0000003) operator = jacky.xxx@univ-nantes.fr = mount # (0000003) # mail = root@localhost = all, !skipped, !saved, !audit # (0000002) mail = jacky.xxx@univ-nantes.fr = all, !skipped, !saved, !audit # (0000002) console = all, !skipped, !saved, !audit append = "/var/log/bareos/bareos.log" = all, !skipped, !saved, !audit catalog = all, !skipped, !saved, !audit } Messages { Name = Standard-JC Description = "Reasonable message delivery -- send most everything to email address and to the console." # operatorcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos: Intervention needed for %j\" %r" operatorcommand = "/usr/bin/bsmtp -h smtp.univ-nantes.prive -f \"\(Bareos\) \<no-reply@univ-nantes.fr\>\" -s \"Bareos-1: Intervention needed for %j\" %r" # mailcommand = "/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \<%r\>\" -s \"Bareos: %t %e of %c %l\" %r" mailcommand = "/usr/bin/bsmtp -h smtp.univ-nantes.prive -f \"\(Bareos\) \<no-reply@univ-nantes.fr\>\" -s \"Bareos-1: %t %e of %c %l\" %r" # operator = root@localhost = mount # (0000003) operator = jacky.xxx@univ-nantes.fr = mount # (0000003) # mail = root@localhost = all, !skipped, !saved, !audit # (0000002) mail = jacky.xxx@univ-nantes.fr = all, !skipped, !saved, !audit # (0000002) console = all, !skipped, !saved, !audit append = "/var/log/bareos/bareos.log" = all, !skipped, !saved, !audit catalog = all, !skipped, !saved, !audit } Pool { Name = Full Pool Type = Backup Recycle = yes # Bareos can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 365 days # How long should the Full Backups be kept? (0000006) Maximum Volume Bytes = 50G # Limit Volume size to something reasonable Maximum Volumes = 100 # Limit number of Volumes in Pool Label Format = "Full-" # Volumes will be labeled "Full-<volume-id>" } Pool { Name = Differential Pool Type = Backup Recycle = yes # Bareos can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 90 days # How long should the Differential Backups be kept? (0000009) Maximum Volume Bytes = 10G # Limit Volume size to something reasonable Maximum Volumes = 100 # Limit number of Volumes in Pool Label Format = "Differential-" # Volumes will be labeled "Differential-<volume-id>" } Pool { Name = Incremental Pool Type = Backup Recycle = yes # Bareos can automatically recycle Volumes AutoPrune = yes # Prune expired volumes Volume Retention = 30 days # How long should the Incremental Backups be kept? (0000012) Maximum Volume Bytes = 1G # Limit Volume size to something reasonable Maximum Volumes = 100 # Limit number of Volumes in Pool Label Format = "Incremental-" # Volumes will be labeled "Incremental-<volume-id>" } Pool { Name = Scratch Pool Type = Scratch } Console { Name = bareos-mon Description = "Restricted console used by tray-monitor to get the status of the director." Password = "7...Z" CommandACL = status, .status JobACL = *all* } Console { Name = "PamConsole" Password = "Q...i" UsePamAuthentication = yes TlsEnable = false # Profile = "webui-admin" CommandACL = status, .status JobACL = *all* } Console { Name = "pam-webui" Password = "Q...i" UsePamAuthentication = yes TlsEnable = false #TLS Enable = no #Profile = "webui-admin" } Profile { Name = operator Description = "Profile allowing normal Bareos operations." Command ACL = !.bvfs_clear_cache, !.exit, !.sql Command ACL = !configure, !create, !delete, !purge, !sqlquery, !umount, !unmount Command ACL = *all* Catalog ACL = *all* Client ACL = *all* FileSet ACL = *all* Job ACL = *all* Plugin Options ACL = *all* Pool ACL = *all* Schedule ACL = *all* Storage ACL = *all* Where ACL = *all* } Profile { Name = webui-admin CommandACL = !.bvfs_clear_cache, !.exit, !.sql, !configure, !create, !delete, !purge, !sqlquery, !umount, !unmount, *all* Job ACL = *all* Schedule ACL = *all* Catalog ACL = *all* Pool ACL = *all* Storage ACL = *all* Client ACL = *all* FileSet ACL = *all* Where ACL = *all* Plugin Options ACL = *all* } #Profile { # Name = webui-admin-catalog1 # CommandACL = !.bvfs_clear_cache, !.exit, !.sql, !configure, !create, !delete, !purge, !sqlquery, !umount, !unmount, *all* # Job ACL = *all* # Schedule ACL = *all* # Catalog ACL = MyCatalog-1 # Pool ACL = *all* # Storage ACL = *all* # Client ACL = *all* # FileSet ACL = *all* # Where ACL = *all* # Plugin Options ACL = *all* #} #Profile { # Name = webui-admin-catalog2 # CommandACL = !.bvfs_clear_cache, !.exit, !.sql, !configure, !create, !delete, !purge, !sqlquery, !umount, !unmount, *all* # Job ACL = *all* # Schedule ACL = *all* # Catalog ACL = MyCatalog-2 # Pool ACL = *all* # Storage ACL = *all* # Client ACL = *all* # FileSet ACL = *all* # Where ACL = *all* # Plugin Options ACL = *all* #} ############################################################### ############################## User ########################### ############################################################### ############################## DSIN ########################### User { Name = "xxx-j" # Profile = "webui-admin" Profile = "webui-SC-DVE-samba-dve" # Profile = "webui-SC-SUMPPS-samba-sumpps" # Profile = "webui-admin-catalog1" # Profile = "webui-admin-catalog2" # Profile = "webui-samba" # CommandACL = status, .status # JobACL = *all* } ################################################################## ############################ INCLUDE ############################# ################################################################## ########################### Serveurs infra ###################### @/etc/bareos/bareos-dir.d/include/bareos-webui.conf ################## Serveurs samba centraux ###################### @/etc/bareos/bareos-dir.d/include/SC-AC-samba-ac.conf @/etc/bareos/bareos-dir.d/include/SC-ACN-samba-acn.conf @/etc/bareos/bareos-dir.d/include/SC-ARCHIVES-samba-archives.conf @/etc/bareos/bareos-dir.d/include/SC-CAB-samba-cab.conf @/etc/bareos/bareos-dir.d/include/SC-CAP-samba-cap.conf @/etc/bareos/bareos-dir.d/include/SC-CCP-samba-ccp.conf @/etc/bareos/bareos-dir.d/include/SC-CDP-samba-cdp.conf @/etc/bareos/bareos-dir.d/include/SC-COM-samba-com.conf @/etc/bareos/bareos-dir.d/include/SC-CPUN-samba-cpun.conf @/etc/bareos/bareos-dir.d/include/SC-CRSU-samba-crsu.conf @/etc/bareos/bareos-dir.d/include/SC-DAF-samba-daf.conf @/etc/bareos/bareos-dir.d/include/SC-DAJ-C2AI-samba-daj-c2ai.conf @/etc/bareos/bareos-dir.d/include/SC-DCI-samba-dci.conf @/etc/bareos/bareos-dir.d/include/SC-DDSPS-samba-ddsps.conf @/etc/bareos/bareos-dir.d/include/SC-DEI-samba-dei.conf @/etc/bareos/bareos-dir.d/include/SC-DEVU-samba-devu.conf @/etc/bareos/bareos-dir.d/include/SC-DGS-samba-dgs.conf @/etc/bareos/bareos-dir.d/include/SC-DIR-samba-dir.conf @/etc/bareos/bareos-dir.d/include/SC-DPIL-samba-dpil.conf @/etc/bareos/bareos-dir.d/include/SC-DRHDS-samba-drhds.conf @/etc/bareos/bareos-dir.d/include/SC-DRPI-samba-drpi.conf @/etc/bareos/bareos-dir.d/include/SC-DSIN-samba-dsin.conf @/etc/bareos/bareos-dir.d/include/SC-DSIN-samba-ticem.conf @/etc/bareos/bareos-dir.d/include/SC-DVE-samba-dve.conf @/etc/bareos/bareos-dir.d/include/SC-MTE-samba-mte.conf @/etc/bareos/bareos-dir.d/include/SC-NEXT-samba-next.conf @/etc/bareos/bareos-dir.d/include/SC-SUAPS-samba-suaps.conf @/etc/bareos/bareos-dir.d/include/SC-SUMPPS-samba-sumpps.conf @/etc/bareos/bareos-dir.d/include/SC-REFORME-samba-reforme.conf bareos@bareos-1:/etc/bareos$ |
|
Thanks for your configuration but there's no explanation about the following fact When the restore will be triggered Bareos is wanting volume V_Complete-SC-DAF-samba-daf-1120 to be present on SD device File-SC-CAP-samba-cap-sd1 and storage definition FileStorage-SC-CAP-samba-cap not DAF |
|
Hello, If I well understand, my configuration is or seems ok, but the bareos behavior is not the one expected, with no explanation. Is it or seems to be a bug ? At least, have you an advise to have no more this situation : purge all database, reinstall on another server bareos from scratch, change my configuration, etc... Thanks |
|
I will not be allowed to do a full consulting session here (for free) and I think this can be understable. What I would advise is the following, maybe in the past those media where located in a pool which was using CAF storage. and now they are handled by DAF storage. I will check all incriminated volumes, and update their storage attributes in the database to their actual real usable. in case of *list media=V_Complete-SC-DAF-samba-daf-1120 +---------+----------------------------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+---------------------------+ | mediaid | volumename | volstatus | enabled | volbytes | volfiles | volretention | recycle | slot | inchanger | mediatype | lastwritten | storage | +---------+----------------------------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+---------------------------+ | 1,120 | V_Complete-SC-DAF-samba-daf-1120 | Append | 1 | 55,260,062,182 | 12 | 5,184,000 | 1 | 0 | 0 | File | 2022-09-17 04:13:42 | File-SC-CAP-samba-cap-sd1 | +---------+----------------------------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+---------------------------+ * *llist media=V_Complete-SC-DAF-samba-daf-1120 mediaid: 1,120 volumename: V_Complete-SC-DAF-samba-daf-1120 slot: 0 poolid: 62 pool: Complete-SC-DAF-samba-daf mediatype: File firstwritten: 2022-09-16 23:55:01 lastwritten: 2022-09-17 04:13:42 labeldate: 2022-09-16 23:55:01 voljobs: 1 volfiles: 12 volblocks: 856,586 volmounts: 1 volbytes: 55,260,062,182 volerrors: 0 volwrites: 856,587 volcapacitybytes: 0 volstatus: Append enabled: 1 recycle: 1 volretention: 5,184,000 voluseduration: 1,814,400 maxvoljobs: 0 maxvolfiles: 0 maxvolbytes: 107,374,182,400 inchanger: 0 endfile: 12 endblock: 3,720,454,629 labeltype: 0 storageid: 20 deviceid: 0 locationid: 0 recyclecount: 0 initialwrite: scratchpoolid: 0 scratchpool: recyclepoolid: 0 recyclepool: comment: storage: File-SC-CAP-samba-cap-sd1 update volume=V_Complete-SC-DAF-samba-daf-1120 storage=File-SC-DAF-samba-daf-sd1 With this during a restore the right storage will be use and call, so normally you shouldn't have to change it when you want to do a restore and then will close the need to have it in webui ;-) It is a simple change to do, then you can report a restore try with bconsole and webui. Regards. |
|
Bruno, I understand and agree with yours explanations. Thanks for your attention during all these last days. Jacky |
|
Hello, After speaking here, a question about consulting session : do you have a catalog of offers of maintenance consulting or audit for our bareos ? Terms and prices ? Thanks |
|
Hello, consulting and audit are often very tailored to the end user needs, so I'm not sure we have a catalog for that. I invite you to contact M. Frank Kohler with sales@bareos.com to have a direct contact and process to the best of your needs. Maybe we can eventually propose something with native french speakers. |
|
Volumes needed by restore are usually linked to corresponding storage, need to change the storage is normally required. From that webui doesn't implement this possibility. Additional paid development can ordered to add the field so extreme case can also be covered. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2022-09-20 17:35 | Jacky44 | New Issue | |
2022-09-20 17:35 | Jacky44 | Tag Attached: restore | |
2022-09-20 17:35 | Jacky44 | Tag Attached: storage | |
2022-09-21 15:05 | bruno-at-bareos | Note Added: 0004750 | |
2022-09-22 14:54 | Jacky44 | Note Added: 0004765 | |
2022-09-22 14:54 | Jacky44 | File Added: Capture du 2022-09-22 14-33-06.png | |
2022-09-22 15:15 | bruno-at-bareos | Note Added: 0004766 | |
2022-09-22 15:33 | Jacky44 | Note Added: 0004767 | |
2022-09-22 17:05 | bruno-at-bareos | Note Added: 0004768 | |
2022-09-23 11:18 | Jacky44 | Note Added: 0004772 | |
2022-09-26 14:11 | bruno-at-bareos | Note Added: 0004774 | |
2022-09-26 18:40 | Jacky44 | Note Added: 0004778 | |
2022-09-28 16:28 | bruno-at-bareos | Note Added: 0004781 | |
2022-09-28 18:18 | Jacky44 | Note Added: 0004782 | |
2022-09-29 10:51 | bruno-at-bareos | Note Added: 0004784 | |
2022-09-29 11:04 | Jacky44 | Note Added: 0004785 | |
2022-09-29 15:21 | bruno-at-bareos | Note Added: 0004786 | |
2022-09-29 17:01 | Jacky44 | Note Added: 0004789 | |
2022-10-04 18:31 | Jacky44 | Note Added: 0004806 | |
2022-10-05 10:28 | bruno-at-bareos | Note Added: 0004810 | |
2022-10-06 17:43 | bruno-at-bareos | Assigned To | => bruno-at-bareos |
2022-10-06 17:43 | bruno-at-bareos | Status | new => closed |
2022-10-06 17:43 | bruno-at-bareos | Resolution | open => no change required |
2022-10-06 17:43 | bruno-at-bareos | Note Added: 0004817 |