vzdump over sshfs - How to use RAM instead of /tmp on host ?

poka

Active Member
Jul 12, 2017
9
0
41
34
You know that when vzdump detects that the backup destination folder is mounted in sshfs, it first copies the archives to the local /tmp folder before sending it to the destination.

This uses up the disc for little.
Isn't it possible to tell vzdump to use RAM as a buffer instead of /tmp when it's possible ?
 
Last edited:
Hi,
vzdump offers the --tmpdir option, so you could create a tmpfs or zram based block device, create a filesystem on that and mount it somewhere. Then give the mountpoint as option. Of course you have to make sure the actual tmp files fit into memory, otherwise this will not work.

As alternative you could also use the --stdout option to write the stream to a pipe and then do with that byte stream whatever it is you like.
 
On Debain (and maybe PVE too as it is based on Debian?) you can also run...
Code:
cp /usr/share/systemd/tmp.mount /etc/systemd/system/
systemctl enable tmp.mount
...to mount your /tmp as a tmpfs filesystem. That way your /tmp folder would always be stored in RAM.
I always do that to reduce SSD wear.
 

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!