Backup folder inside VM to LXC/drive (nextcloud)

tuxx

New Member
Mar 19, 2024
5
0
1
Hello,

I'm trying to backup some folders in my VM to a backup drive/storage in proxmox (ZFS), but I'm not sure about the best way and possibilities.

Current setup:
  • Nextcloud VM (picture folder)
  • backup drive in proxmox
  • LXC (unprivileged) with mounted backup drive, acting as SMB server (debian, copilot)
The idea was that I upload my pictures to nextcloud (smartphone) and at night backup the picture folder of some users to the backup drive.
Now, sadly VM can not easily share a drive with LXC. My lxc which is acting as file server/smb share is unprivileged (meaning no NFS if I'm correct).

What I thought about: I (if possible) share the picture folder of the nextcloud VM via SMB (or NFS if possible) with read only rights. Then, the unprivileged LXC can rsync the folders every night into the backup drive.

VM picture folder sharing (read only) --> LXC (unpriv) mounted backup drive.

Is there a better or easier way of doing this? Since nextcloud is accessible via the internet, I want to keep it as save as possible.
 
Hi,
if your intention is to backup only the picture folder of the VM, not the rest of the VM you could create a dedicated drive just for that and mount it at the required location in the VM. Then exclude all disks except for this one from the backup job. This will create however a block level backup and would require you to mount the LXCs share as storage on the Proxmox VE host as well.

Do you require to have a file level backup, so you can easily access the files on the backup location?
 
Hi,
if your intention is to backup only the picture folder of the VM, not the rest of the VM you could create a dedicated drive just for that and mount it at the required location in the VM. Then exclude all disks except for this one from the backup job. This will create however a block level backup and would require you to mount the LXCs share as storage on the Proxmox VE host as well.

Do you require to have a file level backup, so you can easily access the files on the backup location?
Many thanks for the reply, much appreciated.
The first suggestions sounds good, but I'm afraid it is like you mentioned in your last sentence.
I'm aiming for a file level backup, meaning that the separate files should be accessible.

Nextcloud VM picutres -> ZFS backup drive -> ZFS backup drive shared via SMB and pictures can be accessed via SMB.
 

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!