Discussion:
[bareos-users] Copy job help (if even possible)
Marek Grudzinski
2017-04-26 05:49:37 UTC
Permalink
Hi there,

I'm currently trying out to setup small converged environments with limited resources.

I currently have a setup of a single machine running both DIR, SD and a local FD for backing up configs&db.

The backend storage is a attached disk via nfs. I'm using only disk as storage.

Backups are clients (remote FD) as well as the local FD picks up vmware backups via the vmware plugins.

Each job has its own fileset and pool but shares schedules to some extent (it is easier for me to handle retention and keep track on what is put where as well as modifying each backup.. you could say it gives me my wished granularity & other "features" with diskbased backups)

Now comes the next part where I want to implement copy jobs (to another disk storage).

So I have the following setup (its very simple and close to defaults):

#example of bareos-fd jobfile:
Job {
Name = bareos-fd
FileSet = bareos-fd
Type = Backup
Client = bareos-fd
Schedule = nightly_2300
Messages = Standard
Storage = File
Pool = bareos-fd
Priority = 10
Accurate = yes
Max Full Interval = 7 days
ClientRunBeforeJob = "/etc/bareos/rear.sh"
}


#same but pool
Pool {
Name = bareos-fd
Pool Type = Backup
Recycle = yes
Recycle Oldest Volume = yes
AutoPrune = yes
Action On Purge = Truncate
Volume Retention = 14 days
Maximum Volumes = 16
Maximum Volume Jobs = 1
Label Format = "bareos-fd-"
}

#im skipping fileset since that is kinda irrelevant

#/etc/bareos/bareos-dir.d/storage/File.conf
Storage {
Name = File
Address = 10.10.10.10 #basically localhost
Password = "storagepassword"
Device = FileStorage01
Device = FileStorage02
Device = FileStorage03
Device = FileStorage04
Device = FileStorage05
Media Type = File
Maximum Concurrent Jobs = 5
}

#/etc/bareos/bareos-sd.d/storage/bareos-sd.conf
Storage {
Name = bareos-sd
Maximum Concurrent Jobs = 5
}

#/etc/bareos/bareos-sd.d/device/FileStorage.conf
Device {
Name = FileStorage01
Media Type = File
Archive Device = /var/lib/bareos/storage
LabelMedia = yes
Random Access = yes
AutomaticMount = yes
RemovableMedia = no
AlwaysOpen = no
Maximum Concurrent Jobs = 1
}

Device {
Name = FileStorage02
Media Type = File
Archive Device = /var/lib/bareos/storage
LabelMedia = yes
Random Access = yes
AutomaticMount = yes
RemovableMedia = no
AlwaysOpen = no
Maximum Concurrent Jobs = 1
}
...
and so on until FileStorage05...


Now, I'd like to add a different device.. say CopyStorage{01..05} and point that to /var/lib/bareos/copy (or something else...) this path will have a different nfs path and I want copyjobs of ALL my pools to go there.

So the question is how to configure this without losing any of my previous "features".

I want to keep the previous configuration but willing to change things as long as it keeps the functionality I need.

My initial though was something in the lines of:


#example of pool config(?)
Pool {
Name = bareos-fd
Pool Type = Backup
Recycle = yes
Recycle Oldest Volume = yes
AutoPrune = yes
Action On Purge = Truncate
Volume Retention = 14 days
Maximum Volumes = 16
Maximum Volume Jobs = 1
Label Format = "bareos-fd-"
Next Pool = bareos-fd-copy #this is the only change to current configuration
}

#the bareos-fd-copy.conf #additional pool for copying. one per pool/job
Pool {
Name = bareos-fd-copy
Storage = bareos-sd # (?)
}

#note quite sure on the storage part... but Copy.conf next to File.conf
Storage {
Name = Copy
Address = 10.10.10.10 #again its on the same host.. localhost
Password = "storagepassword"
Device = Copy
Media Type = File
Maximum Concurrent Jobs = 1
}

#the copy device
Device {
Name = CopyStorage01
Media Type = File
Archive Device = /var/lib/bareos/copy
LabelMedia = yes
Random Access = yes
AutomaticMount = yes
RemovableMedia = no
AlwaysOpen = no
Maximum Concurrent Jobs = 1
}

Any help would be greatly appreciated. The only examples given in the documentation is for a second SD.. This is something that I don't want to setup (via another metal/vm/container). I'd like to use the current setup if possible.
--
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+***@googlegroups.com.
To post to this group, send email to bareos-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marek Grudzinski
2017-04-26 06:47:36 UTC
Permalink
This post might be inappropriate. Click to display it.
Marek Grudzinski
2017-04-26 07:10:26 UTC
Permalink
So it seems I have solved it:

Basically after I figured out my mistake with media type vs device type configuration things started to fall in place.

Each pool that you need a copy of needs to define which media type it will use. Actually the copy pool needs to define where it should land as well which is very logical I guess.

In my configuration I also have a little different naming standard on the copy job volumes just to easily identify them.. (and can be useful in some instances I guess..).

Which I think I forgot in the first place, stupid mistake :)
If anyone wants my configs for examples or learning, feel free to drop me a mail.
--
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+***@googlegroups.com.
To post to this group, send email to bareos-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Nicolas Jovanovic
2018-07-20 05:46:57 UTC
Permalink
Hello Marek,

After updating the Media Type and the Device Name, did you update the remote storage daemon device too ?

Best regards,

Nicolas
--
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+***@googlegroups.com.
To post to this group, send email to bareos-***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...