Re: Possible to copy backup pools from one storage to another?

Bill Arlofski via Bacula-users <[email protected]>
Newsgroups gmane.comp.bacula.user
Message-ID <[email protected]>
On 11/14/24 9:28 AM, Chris Wilkinson wrote:
 >
> That's great, thanks Bill. It seems I had the correct answer but didn't know how to use it correctly. The level thing threw 
> me off completely.

Ahh!  Good to hear that my "book" about copy jobs was helpful. I have a habit of writing long-winded answers.😆


> My plan is to run the copy job immediately after the backup in a run script
> 
> runcopy.sh %n %p
> 
> with some text substitutions within to change <job>-backup to <job>-copy

Make sure that your Copy Control job has the same priority as the Backup job(s) that call it, or you will end up in a chicken 
and egg situation where the Backup Job is waiting to the Copy control job to finish, but the Copy control job is waiting for 
the Backup job to finish before it starts. :)

Also, have a look at `MaximumConcurrentJobs` in the Copy Control job, and the Backup jobs being copied.

When a Copy control job triggers a copy, two jobs are started: Another Copy control job to manage the Copying of one backup 
job, and a "backup" job representing the new copy job. So, you will need to increase the MaximumConcurrentJobs setting for each.

Also, there is a limiting setting in a Copy control job called `MaximumSpawnedJobs`.

If your Copy control job, using `PoolUncopiedJobs` finds 1,000 backup jobs in a pool that have not been copied yet, by 
default it will spawn 999 new copy control jobs, and take that last jobid and Copy it itself.

You might not want this to be unlimited, especially when you first start using Copy jobs on Pools that have existed for a 
while and may have a lot of jobs in them. :)    Later, once everything is "all caught up", this setting may be left alone, or 
removed since there should only ever be a few Backup jobs each day that need to be copied.


One other note: Since you are planning to trigger the Copy control job from the Backup job(s) when they are finished, you can 
specify the Backup jobid on the command line that calls your script using `%i`.

Then, in your `runcopy.sh` script when you issue the `run job=CopyJobName` command, you can add `jobid=xxxx` and the 
`PoolUncopiedJobs` setting is ignored and Bacula will only copy this one specific JobId.

Hope this helps!


> Thanks

Welcome!


Best regards,
Bill

-- 
Bill Arlofski
[email protected]

_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users
signature.asc (application/pgp-signature, 509 B)
-----BEGIN PGP SIGNATURE-----
Version: ProtonMail

wsBzBAEBCAAnBQJnNkd0CRBIDTDab9XDQBYhBMuLnlBaSQiuSUbb6UgNMNpv
1cNAAACGAAf+JauIpHWfGbzrKZlt1vwBcjpGgY9EZbcVo1uoU4GMnpfOJ1kZ
pUOjqCa/AOzddx7Q+ImrtL7inJ8JrXk9gg0EP/zU5ESn4G+k+O/marNmindy
Kwd1f0IIXiv8NrKWrEw9ptWai1F8UdypgpBywesTNkXalXczvx+1Y88BbmeH
TCIdFFrrrAEMz4ZEBEMRqJOjdKfsnxYGRAgLaJko3zOHoQEKWQk7r3NgKg2n
rcKtQHMVbZCQ5qoKKHhjTgwuGTycFEri/1BgCOHpNss0fZ/0Jn+XyKxowRHo
r65eQ9jbawH/j9KHumoeSi0Z3QfRABW5fNTx+r6mDBVpnWNt8XgeOQ==
=Y+Au
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.