On 12/26/22 10:37, Joey Prevo wrote:
Hello,I'm currently running Bacula 9.6.7 on Ubuntu 20.04 and have been for several months testing it out. We're looking to implement Bacula as a replacement to our current backup system agency wide but before I can present the solution, I have to present a working example. In short, all that I'm trying to accomplish for this example is backup to two drives that are in rotation. For example, the first drive will be mounted for 1 month before being swapped with the alternate drive for a month. After the second drive has been in for 1 month, we'll swap back to the first drive. Additionally, all of the client jobs are marked as incremental. I see that the first time backups are done on the first drive the job is promoted to full backup and then I received incremental backups for each client after that. However, I need to be able to define the second drive. Then when the swap is made from drive 1 to
drive 2,
each of the jobs will create a full backup and then become incremental after this. Additionally it after the swap back to drive 1, the first jobs would still be incremental against where we were at that point in time. The description above is our current working scenario using Retrospect just scaled way down for testing purposes. For reference, we typically backup around 100ish clients and have three sets of drives that are in rotation: onsite online set, an onsite offline set, and an offsite sets. These sets are rotated each week. Bacula has performed excellent with everything I have thrown at it in terms of tailor jobs, scheduling, etc. (leaps and bounds better than Retrospect in my opinion) backing up to a single drive. However, I've really hit a wall trying to setup this basic scenario with two drives in rotation. Does anyone has a basic example for something like this? I've spent close to a month
researching and trying things prior to send
this email, but I just can't seem to figure it out. I've spent a great deal of time trying to work out an autochanger scenario, but I'm feeling as though my scenario may just come down to defining the two drives and working out a scheduling so that one month they go to one drive, the next month they go to the other drive, the next month the original drive, etc. I'm really hoping there is a more elegant solution possible utilizing an autochanger (if needed) and letting Bacula handle the leg work versus having to do it all via scheduling. I don't feel as though management will accept my proposal if it's done via scheduling and requires a bunch of hand holding. Retrospect has served us well for many years however, in recent years stability has been an issue and we've had more and more issues with Windows clients. Bacula on the other hand always seems to work flawlessly even on the more common
trouble client! I'm really hoping we
can make the switch and of course we will be a paying customer. Thank you to whom ever takes the time to read this and help out! Joey
Hello Joey, You want Josh Fischer's "vchanger" There really is no other sensible way to attempt to manage what you are looking to do with Bacula. vchanger treats your physical drives as "magazines", with each "magazine" having multiple Bacula file volumes on it. You will, of course, set up an autochanger with some number of drive devices in them, and the autochanger will make use of vchanger. When you swap out the physical drives, you just send Bacula the command: * update slots storage=xxx drive=0 This will update the "InChanger" field for the Bacula file volumes in the catalog database so Bacula knows which volumes are available so it does not ask for a file volume that is on the other physical disk. Additionally, you might want to look into `autofs` for automount ing the drives when you swap them. I have this simple script I run when I am swapping out my drives. It stops the autofs service, which automatically dismounts any of my removable drives if they are mounted, waits for me to press a key after swapping the drive(s), and then issues the `update slots` command so Bacula is aware of what volumes are now available. ----8<---- #!/bin/bash # waa - 20220204 # -------------- drive="0" storage="speedy-file" bcbin="/opt/comm-bacula/sbin/bconsole" bccfg="/opt/comm-bacula/etc/bconsole.conf" wait_for_key() { read -p "Press any key to continue... " -n1 -s echo } function chk_return() { return=$? if [ $return != '0' ]; then echo "Last command exited non-zero. (${return})" exit $return fi } echo -e "\nStopping autofs..." systemctl stop autofs chk_return echo "Please swap eSATA drives now..." wait_for_key echo -e "\nRestarting autofs..." systemctl start autofs chk_return echo "Forci ng automomount of available eSATA drives..." /opt/comm-bacula/include/scripts/force_automount.sh chk_return echo "Updating slots with bconsole..." echo "update slots storage=${storage} drive=${drive}" | ${bcbin} -c ${bccfg} echo "Done!" ----8<---- Hope this helps! Bill -- Bill Arlofski w...@protonmail.com
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users