Scenario 5: Backup a Windows client using BWeb Management Suite
In this scenario we will add and backup a Windows client using BWeb Management Suite.
The steps we will go through are: installing a File Daemon, configuring a Windows system for backup jobs, and running a backup job.
This scenario delivers step-by-step instructions on how to install and configure a file deamon on a single Windows system. Most customers will have multiple Windows systems, for which automation tools are available. If you experience any connection issues with the client in this scenario, please jump to "Testing client connectivity if the job fails" to fix the issue.
Part 1. Install File Daemon Software
Installing the Bacula File Daemon on the Windows client (file daemon).
Pre-requisite: To run this scenario you will need any version of a Windows systems on either a physical or virtual machine where you have Administrator rights.
- Open a web browser and download or run the bacula-enterprise-demo executable file from the Bacula Enterprise Trial VM. The Windows installer link may be found in this directory: http://<IP of Trial VM>/clients/windows
To download the Windows installer, please click on the "bacula-enterprise-demo-win64-x.y.x.exe" (where x.y.z is the current version available in the Trial VM).
- Run the installer. Select the Automatic Installation and select all the default options, including leaving the Director information fields blank.
- Click "Install"
- When prompted to "Save Client template", click "Next", and then finish the install.
- Now, open BWeb in your web browser on the Windows client computer. The address is: https://<IP of Trial VM>:9180, and the username and password are both admin by default.
- Open BWeb configuration mode by clicking 'Configuration' → 'Configure Bacula'.
- Then begin the “Add a New Client Resource” Wizard from the configuration mode main page.
- Enter the client name and a description. The client name should usually be the DNS name for the client with ‘-fd’ attached for clarity. If you don’t have this information, open a command prompt (type ‘cmd’ into the search bar) and run ‘ipconfig /all’ and copy the hostname into this field. You can also add a description that will be displayed when viewing the client in BWeb.
- Click ‘Next’ and select the host operating system type and enter the IP address or FQDN from the client. This can be copied/pasted from your command prompt window.
- BWeb will set a random default password used to connect to this file daemon. You can modify this if desired.
- Click ‘Next’, and then ‘Next’ again to skip the TLS setup page. The next page displays the configuration you’ve created. This can be copied and pasted directly into the configuration file on your newly installed file daemon. Highlight and copy the text:
- Then open Notepad as an administrator. Type notepad into the search window, and then right click the Notepad program and select ‘Run as administrator.’
- Open C:\Program Files\Bacula\bacula-fd.conf. You’ll have to change the selection dropdown to show ‘All Files’.
- Delete the contents of the file and replace with the configuration you copied from BWeb. Save and exit notepad.
- Return to the BWeb window, click ‘Next’ and then ‘Edit’.
- You can review or make changes to the client config here. In this exercise, please just click ‘Save’.
- The new client should show up in your clients list. Return to the Workset page by clicking ‘Workset’.
- From the workset page, commit your updated client configuration, and then reload the director.
- Your new client configuration is now added to the Director so that Bacula knows where to find it and how to authenticate. Your Windows client configurations are also updated to match what the Director knows. You can now choose to disable the Windows firewall and reboot, or continue on with the next steps to restart the Bacula FD service and add a firewall rule for Bacula.
Part 2: Windows Configuration Steps:
Please follow these steps if you don’t want to disable the Windows firewall and reboot to complete the client install.
(Re)start Bacula File Backup Service:
- Open the services app by typing ‘Services’ into the search bar.
- Start (or restart if it isn’t running) the Bacula File Backup Service. Also ensure that it is set to run automatically at boot.
- Now add a firewall rule for the Bacula File Daemon: Type ‘Windows Firewall’ into the search bar, and open ‘Allow an app through Windows firewall’. Note: The steps may vary here for earlier Windows versions. If you are unable to add a firewall rule by the application, you can add an inbound rule that allows port 9102 to connect through the Windows firewall.
- Click ‘Change Settings’ to unlock, and then ‘Allow another App’.
- Click ‘Add’ and brows to find bacula-fd.exe in C:\Program Files\Bacula\
- Click ‘Open’, and then ‘Add’ to confirm the firewall rule. You may also want to click ‘Network Types’ and confirm that this rule will apply to the network type that matches your backup network. If unsure, you can select all network types but this is usually not recommended.
- Click ‘OK’ to confirm your firewall rules, and the File Daemon should be ready to receive connections. This concludes the configuration steps for the File Daemon.
Part 3: Add and run a job for the new Windows client via BWeb
- Open BWeb in Firefox. This can be from the new Windows client or another trusted machine. Click ‘Configuration’ and then ‘Configure Bacula’ to enter Configuration mode.
Important Note: When you are in configuration mode, you will see an “Autocommit” option in the far right side of the main menu. If you click on this, then the changes you make will be committed automatically, eliminating the need to click “Workset => Commit => Reload/Restart” after making modifications to your configuration.
- Click "Add a new Backup" in the Wizards menu on the left.
- In step 1/5, give the job the a descriptive name like “Windows-10-demo-Users” or something similar, and a description, then select "BackupsToDedup" from the Job Template drop-down menu. Click ‘Next’.
- In Step 2/5, select the new Windows client from the "Client Name" drop-down menu and click ‘Next’.
- In step 3/5, click the word ‘now’ to add a new Fileset. A Fileset is the list of files that will be backed up by a Bacula job that uses it, as well as options that will be applied to the files such as compression, deduplication, many Enterprise plugins, and signature hashes that ensure file integrity.
- Give the new Fileset a meaningful name and description, and remember that Filesets can be shared among many backup jobs. Then click ‘Add include list’.
- Select the new client from the dropdown, and a directory listing for the new client should appear. Select the Users directory and click ‘Add selection’. You can add the ‘:/’ instead to get all files if you would like a larger backup test. Click ‘Next’.
- Here you can set many options for the fileset. To keep things simple, please just choose a signature (md5 or sha1) for file integrity checking, and enable ‘Bothsides’ deduplication to turn on client side deduplication for future testing scenarios. Then click ‘Apply’.
- Click Add to add the fileset.
- Ensure the newly created Fileset is selected in the dropdown and click ‘Next’.
- In step 4/5, select "Dedup_Full_30Days" from the drop-down menus for the "Pool Name", and “DedupAutochanger” the "Storage Name". Leave "Messages" as "Default". Click ‘Next’.
- In step 5/5, select "Manual" from the Schedule drop-down menu since we will be starting the job manually. Click ‘Next’.
- After clicking Next, you will be taken to the new Job's configuration page for review. Do not change anything here.
Note: The "Level" by default is incremental, but Bacula will automatically upgrade it to a full backup since no full backup has been made prior to this scenario. If you run this job a second time it will be an incremental job as expected unless you override the default.
- Click "Save" and you will be taken to the list of jobs, and you should see your new job in the list. Click "Workset" at the top menu.
- On this page, you will once again see the list of changes that have been staged but not yet committed to your configuration. Click ‘Commit.’
- After committing the changes to the workset you will be presented with a "Services restart/reload" dialog. In this box, check only the "Reload" checkbox for the Director, then click the "Restart/Reload" button.
- Click on the "Bacula Enterprise" item in the top menu to exit configuration mode.
- Click on Jobs in the top menu, then Defined Jobs in the drop down menu.
- In Step 1, Select the "Windows-10-demo-Users" job from the Job Name drop-down menu.
- Once you select the new "Windows-10-demo-Users" job, you will be taken to Step 2, where you can review the properties of the job that is about to be run. Do not make any changes here, just click "Run Job".
Once you click "Run Job", the job will start and you will be redirected to a job status page where you can see the job running. The backup may take some time depending on the amount of data to be backed up. This page will be automatically updated every 30 seconds, but you may click on the Refresh button (two green arrows) to get an immediate updated view.
Once the job is finished you should have a job summary page similar to the image below. Notice the green check mark at the top under the "Status" column indicating that this job has completed normally.
In the yellow box is the job log, including a truncated summary at the bottom. The log should contain the words “Backup OK.”
You can now test the connectivity between the Director and this new Windows client in BWeb by clicking ‘Clients -> Clients’ from the top menu.
From the list of clients, click the checkbox next to the new Windows client, then click the second "Status" icon on the far right.
- Check the IP addresses or fully qualified domain names in both the client definition in BWeb Management Suite and on the Windows client in C:\Program Files\Bacula\bacula-fd.conf
- Check that the passwords, name of the director (with -dir) or file daemon (with -fd) in the new Windows "bacua-fd.conf" file match what is in the Director's configuration for this Client
- Check that your Workset is applied and reload the Director
- Finally, on the new Windows client, check that the firewall is disabled
- You may also contact the Bacula Systems’ support team if you cannot determine the cause of the connectivity problem. To submit a helpdesk ticket, just click the “Contact Support” icon on the Bacula Enterprise Trial’s Landing page in your browser.