2

How do you set up a job in bacula to back up a windows machine via SMB (machine does not have the bacula agent installed)?

According to the feature set this is supported.

I would imagine somewhere I need to define the \machinename\c$

?

1 Answer 1

2

First of all, this is pretty highly discouraged by bacula devs, it slows down jobs a lot, and due to SMB file handling, can cause issues (like weirdly named files). The client takes like 2 minutes to install and I haven't had issues with it.

All that said though, there are a couple of ways to do it. As far as I know, bacula doesn't work with SMB directly, you have to mount the shares using SMBFS/CIFS on the filesystem and then go from there.

First option, you could use a third machine or the director box to mount the SMB share permanently and then just add that path to the job.

The other option would be to write a quick little script and use the RunBeforeJob directive to mount the share before you backup and then the RunAfterJob directive to disconnect after the job is finished. Once again, you would just add the mount point to the job.

1
  • So far, I can't get this to work at all. I get: could not stat /var/windows_mountpoint/, ERR=Resource Temporarily Unavailable. Manually running stat /var/windows_mountpoint/ works just fine, so I think bacula-fd no longer functions properly for CIFS mounts.
    – aphid
    Sep 21, 2022 at 8:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .