Backup Files from SMB Share to PBS?

shift.cx

New Member
Jun 20, 2024
9
0
1
I'm currently running a Proxmox Backup Server (PBS) and I need to back up files stored on an SMB share to other datastores within PBS.

Here's what I want to do:
  1. Mount an SMB share on the PBS.
  2. Create a backup job that pulls data from this SMB share.
  3. Store this backup in one of the PBS's local or other network datastores.
Has anyone done this before and what is the best way?

Best regards,
Stefan
 
I'm currently running a Proxmox Backup Server (PBS) and I need to back up files stored on an SMB share to other datastores within PBS.

Here's what I want to do:
  1. Mount an SMB share on the PBS.
  2. Create a backup job that pulls data from this SMB share.
  3. Store this backup in one of the PBS's local or other network datastores.
Has anyone done this before and what is the best way?

Best regards,
Stefan
Hi,
please have a look at the proxmox-backup-client [0] which allows you to create file level backups. For the sync from one PBS datastore to another one you can use sync jobs [1].

[0] https://pbs.proxmox.com/docs/backup-client.html
[1] https://pbs.proxmox.com/docs/managing-remotes.html#sync-jobs
 
Hi,
please have a look at the proxmox-backup-client [0] which allows you to create file level backups. For the sync from one PBS datastore to another one you can use sync jobs [1].

[0] https://pbs.proxmox.com/docs/backup-client.html
[1] https://pbs.proxmox.com/docs/managing-remotes.html#sync-jobs
I figured out that Proxmox Backup Client (PBC) is what I need to use. Could you please confirm if I have the steps right?
  1. Install PBC on my PBS server.
  2. Mount the SMB share.
  3. Create a script to trigger the PBC backup job.
  4. Set up mailutils and include failchecks in the backup script for email notifications in case of failure.
Is that actually the correct way to Backup Files on a Networkshare? Is a proper Built-in Solution planned for PBS?
 
I figured out that Proxmox Backup Client (PBC) is what I need to use. Could you please confirm if I have the steps right?
  1. Install PBC on my PBS server.
  2. Mount the SMB share.
  3. Create a script to trigger the PBC backup job.
  4. Set up mailutils and include failchecks in the backup script for email notifications in case of failure.
Well, who provides the network share? What files are stored on the share? You will probably get better performance if you install the client directly on the host providing the share and backup from there. Also, if the network share is provided by a VM sitting on top of PVE, you can directly backup the VM in PVE.

In general, approach will depend on your datacenter topology.

Is that actually the correct way to Backup Files on a Networkshare?
As stated, better would be to install the client on the share provider.
Is a proper Built-in Solution planned for PBS?
I am not sure what exactly you mean by this. Build in solution for what?
 
Well, who provides the network share? What files are stored on the share? You will probably get better performance if you install the client directly on the host providing the share and backup from there. Also, if the network share is provided by a VM sitting on top of PVE, you can directly backup the VM in PVE.
The network share contains a singular ZIP file with a large database from our own ERP/CRM solution.
This file is stored on a Synology NAS, and is only accessed by a Windows VM and a physical macOS device.
As there is no official PBC for Windows and macOS, I understand that I need to install PBC on a Linux server and attach the SMB share to back up that file to my PBS.

Wouldn't it be more efficient to install PBC directly on my PBS and streamline the process?
This way, I avoid installing PBC on another Linux server, which could confuse my team and complicate our setup (e.g.: install PBC on my Linux based Wiki Server to Backup the Databse of my ERP/CRM Software).


I am not sure what exactly you mean by this. Build in solution for what?
We used to use Veeam in combination with VMware products but switched to PVE and PBS due to the license changes from Broadcom.

In Veeam, we could select a file or folder on a network share and back it up to one of our backup targets.
All backups, including VM backups, file backups, and backup copies, were managed through one interface, which handled monitoring, reporting, encryption, and management.

It sounds like I need to create my own script to trigger the file backup, check its success, and send email notifications if it fails through something like mailutils.

I've just set up PBS, and I assume it can send email notifications for failed VM backups.
It would be ideal if the same interface could also show the status of my file backups and send email notifications for those as well.

hope this makes more sense!
 
The network share contains a singular ZIP file with a large database from our own ERP/CRM solution.
How big is the database dump? Might be worth considering backing up the unzipped dump and let the proxmox-backup-client handle compression and encryption, as that will probably lead to better deduplication of unchanged parts of the database dump. This might be worth to test.

As there is no official PBC for Windows and macOS, I understand that I need to install PBC on a Linux server and attach the SMB share to back up that file to my PBS.
No, currently there are no clients for other operating systems, this is however on the roadmap https://pbs.proxmox.com/wiki/index.php/Roadmap
So performing the backup from the network share is a possible route if the host system is not supported.

Wouldn't it be more efficient to install PBC directly on my PBS and streamline the process?
This way, I avoid installing PBC on another Linux server, which could confuse my team and complicate our setup (e.g.: install PBC on my Linux based Wiki Server to Backup the Databse of my ERP/CRM Software).
Yes, but you will have the additional overhead of the network filesystem layer, which by directly running the client on the host avoids.

In Veeam, we could select a file or folder on a network share and back it up to one of our backup targets.
All backups, including VM backups, file backups, and backup copies, were managed through one interface, which handled monitoring, reporting, encryption, and management.
Okay, I am not familiar with how Veeam handles this (probably via their client side agent?), but as far as i know there are no plans to add such a feature to PBS in the near future. Feature requests are always welcome, you can submit such at https://bugzilla.proxmox.com/, so we can evaluate if and how to implement such a feature.

It sounds like I need to create my own script to trigger the file backup, check its success, and send email notifications if it fails through something like mailutils.

I've just set up PBS, and I assume it can send email notifications for failed VM backups.
It would be ideal if the same interface could also show the status of my file backups and send email notifications for those as well.
Yes, while Proxmox VE is tightly integrated, when you use the proxmox-backup-client directly you will have to setup your own schedule, ecc. Depending on the systems you are running on, this should however be rather straight forward by e.g. a cronjob or a systemd-timer. Sytemd timers might be better suited if you plan to integrate mail notification, e.g. https://wiki.archlinux.org/title/Systemd/Timers#MAILTO describes a possible solution.

Also, the PBS itself has support for event based notifications to different notification targets, including filtering capabilities, see https://pbs.proxmox.com/docs/notifications.html#notifications. Notifications are actively worked on and will see more improvements in future releases.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!