Good afternoon ! 
How to replace mediatype on previously created volumes in a pool? 
The "update All Volumes from Pool" command on mediatype has no effect on 
old volumes 
Thank you!

Pool: Inc-32D-Pool
+---------+---------------------------+-----------+---------+-------------+----------+--------------+---------+------+-----------+-------------+---------------------+-------------------+
| mediaid | volumename                | volstatus | enabled | volbytes    | 
volfiles | volretention | recycle | slot | inchanger | mediatype   | 
lastwritten         | storage           |
+---------+---------------------------+-----------+---------+-------------+----------+--------------+---------+------+-----------+-------------+---------------------+-------------------+
|       5 | test-front1-Incremental-0 | Used      |       1 | 195,603,360 | 
       0 |    2,764,800 |       1 |    0 |         0 | File        | 
2024-03-26 19:02:51 | Local-Inc-Storage |
|       6 | test-front1-Incremental-1 | Used      |       1 | 191,850,710 | 
       0 |    2,764,800 |       1 |    0 |         0 | File        | 
2024-03-27 19:03:05 | Local-Inc-Storage |
|       7 | test-front1-Incremental-2 | Used      |       1 | 193,452,106 | 
       0 |    2,764,800 |       1 |    0 |         0 | File        | 
2024-03-28 19:02:50 | Local-Inc-Storage |
|       9 | test-front1-Incremental-3 | Used      |       1 | 192,004,056 | 
       0 |    2,764,800 |       1 |    0 |         0 | File        | 
2024-03-29 19:02:54 | Local-Inc-Storage |
|      10 | test-dmp-Incremental-4     | Used      |       1 | 173,813,007 
|        0 |    2,764,800 |       1 |    0 |         0 | File        | 
2024-03-30 19:02:03 | Local-Inc-Storage |
|      11 | test-front1-Incremental-5 | Used      |       1 |       1,583 | 
       0 |    2,764,800 |       1 |    0 |         0 | File        | 
2024-03-30 19:02:38 | Local-Inc-Storage |
|      12 | test-dmp-Incremental-6     | Used      |       1 | 173,931,275 
|        0 |    2,764,800 |       1 |    0 |         0 | File        | 
2024-03-31 19:02:03 | Local-Inc-Storage |
|      13 | test-front1-Incremental-7 | Used      |       1 | 191,838,574 | 
       0 |    2,764,800 |       1 |    0 |         0 | File        | 
2024-03-31 19:02:52 | Local-Inc-Storage |
|      14 | test-dmp-Incremental-8     | Used      |       1 | 174,214,813 
|        0 |    2,764,800 |       1 |    0 |         0 | File        | 
2024-04-01 19:02:05 | Local-Inc-Storage |
|      15 | test-dmp-Incremental-9     | Used      |       1 | 174,150,016 
|        0 |    2,764,800 |       1 |    0 |         0 |* Storage-Inc* | 
2024-04-02 12:01:54 | Local-Inc-Storage |
+---------+---------------------------+-----------+---------+-------------+----------+--------------+---------+------+-----------+-------------+---------------------+-------------------+
 



вторник, 16 мая 2023 г. в 15:21:06 UTC+3, Niklas Peters: 

> Hi everyone,
>
>  
>
> I inherited a bareos system that AFAIK hasn’t been set up properly. 
>
> Backups and the restoration of small backups (SQL dumps) seems to have 
> worked so far. 
>
> But I ran into similar errors to the following one a lot when trying 
> Baremetal recoveries: 
>
>  
>
> bareos-sd JobId 90377: Warning: stored/acquire.cc:286 Read open device 
> "FileStorageFull" (/backup/full) Volume "Differential-0544" failed: 
> ERR=stored/dev.cc:716 
> Could not open: /backup/full/Differential-0544, ERR=File or directory not 
> found
>
>  
>
> The Differential files should be in /backup/differential and not full. 
>
> The source of the problem seems to be that we use the same Media type for 
> all our Storages/Devices as described here (
> https://groups.google.com/g/bareos-users/c/LPbuPXCFSl0/m/4K6BgJ0XAwAJ): 
>
>  
>
> root@bareos:/etc/bareos# cat bareos-dir.d/storage/File.conf
>
> Storage {
>
>   Name = FileFull
>
>   Address = bareos                # N.B. Use a fully qualified name here 
> (do not use "localhost" here).
>
>   Password = "*****"
>
>   Device = FileStorageFull
>
>   Media Type = File
>
> }
>
>  
>
> Storage {
>
>   Name = FileDiff
>
>   Address = bareos                # N.B. Use a fully qualified name here 
> (do not use "localhost" here).
>
>   Password = "*****"
>
>   Device = FileStorageDiff
>
>   Media Type = File
>
> }
>
>  
>
> Storage {
>
>   Name = FileIncr
>
>   Address = bareos                # N.B. Use a fully qualified name here 
> (do not use "localhost" here).
>
>   Password = "*****"
>
>   Device = FileStorageIncr
>
>   Media Type = File
>
> }
>
> …
>
>  
>
> root@bareos:/etc/bareos# cat bareos-sd.d/device/FileStorage.conf
>
> Device {
>
>   Name = FileStorageFull
>
>   Media Type = File
>
>   Archive Device = /backup/full
>
>   LabelMedia = yes;                   # lets Bareos label unlabeled media
>
>   Random Access = yes;
>
>   AutomaticMount = yes;               # when device opened, read it
>
>   RemovableMedia = no;
>
>   AlwaysOpen = yes;
>
>   Description = "File device. A connecting Director must have the same 
> Name and MediaType."
>
> }
>
>  
>
> Device {
>
>   Name = FileStorageDiff
>
>   Media Type = File
>
>   Archive Device = /backup/diff
>
>   LabelMedia = yes;                   # lets Bareos label unlabeled media
>
>   Random Access = yes;
>
>   AutomaticMount = yes;               # when device opened, read it
>
>   RemovableMedia = no;
>
>   AlwaysOpen = yes;
>
>   Description = "File device. A connecting Director must have the same 
> Name and MediaType."
>
> }
>
>  
>
> Device {
>
>   Name = FileStorageIncr
>
>   Media Type = File
>
>   Archive Device = /backup/incr
>
>   LabelMedia = yes;                   # lets Bareos label unlabeled media
>
>   Random Access = yes;
>
>   AutomaticMount = yes;               # when device opened, read it
>
>   RemovableMedia = no;
>
>   AlwaysOpen = yes;
>
>   Description = "File device. A connecting Director must have the same 
> Name and MediaType."
>
> }
>
>  
>
> …
>
>  
>
> I’ve gathered that the Media Types should be changed to unique identifiers 
> for each of Device/Storage entries but I am worried that changing it in a 
> running environment will make all the old backups/volumes unusable. 
>
>  
>
> So I’d really appreciate if someone could give me some advice on how to 
> best change the Media Types in a running system. 
>
> Would probably be best to just configure new storage/devices and use those 
> from now on. But maybe there is a way to salvage the old ones. 
>
>  
>
> Please let me know if you got any tips or questions regarding this issue. 
>
>  
>
> Best Regards 
>
>  
>
> Niklas 
>
>  
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bareos-users/1fc25c09-c3b3-4b79-9b00-dfcefeeb4eedn%40googlegroups.com.

Reply via email to