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.