Proxmox is an amazing product. I have been tinkering with it for weeks and the functionality is overwhelming. After 17 years of Windows I finally decided to make the shift to Linux, and Proxmox is a huge help. It allows me to keep my desired server tasks separated from one another so that it will not affect the entire system when I mess up.
I have just re-installed Proxmox on a 120GB SSD, and created a directory on the 1TB HDD that I want to use as my Nextcloud data directory. I can add the disk fine under "Hardware > Add > Hard Disk". However, since I have a lot of data, backups of the VM would take very long. In order to speed things up, I would rather detach the data disk and only back up the VM image. As far as my understanding goes, backing up my Nextcloud data with rsync would be much more effective than doing a complete image backup.
Of course I can do all of this manually, but there are certainly command line options for adding and detaching hard disks. This way I could write a bash file and automatically execute it via a cron job.
Thanks a lot for this great product!
Edit: Just realized that when I detach a hard disk under "Hardware", the created raw image in my directory will not simply be re-attached. Instead, a new one is created the next time I add a hard disk. So I guess I will have to revert to my initial method of adding the physical disk to the VM as a vda device via "qm set VMID -virtio2 /dev/disk/by-id". However I would still need the command to detach it.
Edit 2: When I tried to delete the VM images from the directory, it told me I had to delete them from the Hardware pane of the VM. I now noticed there were two 'unused disks' that I could conveniently re-attach. I am a little confused now. Which scenario would be recommended for my use case, and what are the respective commands for my bash script?
I have just re-installed Proxmox on a 120GB SSD, and created a directory on the 1TB HDD that I want to use as my Nextcloud data directory. I can add the disk fine under "Hardware > Add > Hard Disk". However, since I have a lot of data, backups of the VM would take very long. In order to speed things up, I would rather detach the data disk and only back up the VM image. As far as my understanding goes, backing up my Nextcloud data with rsync would be much more effective than doing a complete image backup.
Of course I can do all of this manually, but there are certainly command line options for adding and detaching hard disks. This way I could write a bash file and automatically execute it via a cron job.
Thanks a lot for this great product!
Edit: Just realized that when I detach a hard disk under "Hardware", the created raw image in my directory will not simply be re-attached. Instead, a new one is created the next time I add a hard disk. So I guess I will have to revert to my initial method of adding the physical disk to the VM as a vda device via "qm set VMID -virtio2 /dev/disk/by-id". However I would still need the command to detach it.
Edit 2: When I tried to delete the VM images from the directory, it told me I had to delete them from the Hardware pane of the VM. I now noticed there were two 'unused disks' that I could conveniently re-attach. I am a little confused now. Which scenario would be recommended for my use case, and what are the respective commands for my bash script?
Last edited: