Proxmox Thread - Home Lab / Virtualization

Hi,
I am not sure if this would be the right place to ask questions but I have been struggling with a few things with proxmox and my Dell Optiplex 3070 Micro.
So far as Internet (router) is concerned, I am using the one provided by my ISP only.
The hardware I am using is a Mini PC (Dell Optiplex 3070) with i3 9100T, 24 gb Ram, 512gb sata m.2 ssd and another sata 2.5inch HDD. (HDD is formatted in EXT4)
I have installed proxmox on the m.2 ssd with a 100gb partition and running following VM/LXC
1. VM-Home Assistant (64gb storage in M.2 SSD & 3GB Ram)
2. VM- Open Media Vault (6gb Ram & 40gb storage for OS and another 1.5TB (HDD) thin allocation for data). Currently running qBittorrent and Jellyfin as docker compose.
3. VM- Nextcloud (8gb Ram & 40GB for OS & 512 gb storage in HDD) The 512gb for storage is formatted in ZFS as I did not have much choice while installing. Installed a pre-installed V from hanssonit
4. LXC- Cloudflared: (1gb ram & 8 gb storage in ssd)

Cloud flare LXC is used to provide tunnel to nextcloud, qBittorrent, proxmox and Jellyfin. I have installed another cloudflare addon with home assistant for redundancy.
Coming to the questions (Kindly bear with me)
1. Foremost concern is regarding if my method of installation is correct with regard to storage /formatting / distribution of HDD. I have read most Homelab people separate the compute units and data storage (mostly NAS).
2. The data of HDD is currently not backed up. What solution should I opt - USB External Storage (but how to take data from open media vault & Nextcloud at the same time) or to deploy another vm with Proxmox Backup Server (which again would use another external storage) or to consider spending money on another mini PC to build a NAS with Open Media Vault. (Don't want to spend for another computer and want to get things accomplished). How to go about data backup?
Although I am trying to keep the crucial Vms (Home Assistant & Nextcloud) Backed up in an external USB HDD at regular intervals by mounting the said drive (as the same is in ntfs and contains other data too) when backing up, the said process is lengthy.
I want this Proxmox instance to be deploy and forget (Apart from timely upgrades) while keeping data backed up. (Trying not to spend too much money but I understand I will have to spend some. Atleast to get a dedicated external storage which I currently do not have.)
I have some experience in this, I fished out this script that I used to use when I was running a 3-cluster Proxmox environment, I don't know where I got it from but you can use it if you'd like,

Save this script to a file, for example, proxmox_backup.sh, and make it executable by running "chmod +x proxmox_backup.sh"
#!/bin/bash

# Proxmox Backup Script

# Set the backup directory
BACKUP_DIR="/path/to/backup/drive"

# Set the Proxmox data directory
PROXMOX_DIR="/var/lib/vz"

# Set the date format for the backup folder
DATE_FORMAT=$(date +"%Y%m%d%H%M%S")

# Create a backup directory with the current date
BACKUP_FOLDER="$BACKUP_DIR/backup_$DATE_FORMAT"
mkdir -p "$BACKUP_FOLDER"

# Backup all VMs
for VMID in $(qm list | awk '$1 ~ /^[0-9]+$/ {print $1}'); do
BACKUP_FILE="$BACKUP_FOLDER/vm_$VMID.vma"
qm backup $VMID $BACKUP_FILE
done

# Backup all LXC containers
for CTID in $(pct list | awk '$1 ~ /^[0-9]+$/ {print $1}'); do
BACKUP_FILE="$BACKUP_FOLDER/ct_$CTID.tar.gz"
pct backup $CTID $BACKUP_FILE
done

# Cleanup old backups (optional)
# Uncomment the following lines to keep only a certain number of backups
# MAX_BACKUPS=5
# ls -1t "$BACKUP_DIR" | tail -n +$(($MAX_BACKUPS+1)) | xargs -I {} rm -r "$BACKUP_DIR"/{}

# Display completion message
echo "Backup completed successfully. Backup stored in: $BACKUP_FOLDER"

Now you can add the above script as a cron job that runs every day at 2 am
Crontab -e
0 2 * * * /path/to/proxmox_backup.sh


I have another that does a backup of all the config so if your system fails and you want your settings you can run the below:
Again save it proxmox_config_backup.sh and make it executable by running "chmod +x proxmox_config_backup.sh" then create the cron job accordingly.
#!/bin/bash

# Proxmox Configuration Backup Script

# Set the backup directory
BACKUP_DIR="/path/to/backup/directory"

# Create a backup directory with the current date
DATE_FORMAT=$(date +"%Y%m%d%H%M%S")
BACKUP_FOLDER="$BACKUP_DIR/config_backup_$DATE_FORMAT"
mkdir -p "$BACKUP_FOLDER"

# Backup Proxmox configuration files
cp -aR /etc/pve/ "$BACKUP_FOLDER"
cp -aR /etc/hostname "$BACKUP_FOLDER"
cp -aR /etc/hosts "$BACKUP_FOLDER"
cp -aR /etc/network/ "$BACKUP_FOLDER"
cp -aR /etc/sysctl.conf "$BACKUP_FOLDER"
cp -aR /etc/modules "$BACKUP_FOLDER"
cp -aR /etc/network/interfaces "$BACKUP_FOLDER"
cp -aR /etc/apt/sources.list "$BACKUP_FOLDER"
cp -aR /etc/apt/sources.list.d/ "$BACKUP_FOLDER"

# Display completion message
echo "Proxmox configuration backup completed successfully. Backup stored in: $BACKUP_FOLDER"
 
Guys going with a NUC13 i5 version for home server. The i7 is close to 30% more costly with same or 5-10% better performance. Same amount of cores. About 15% lesser graphics.
 
I have some experience in this, I fished out this script that I used to use when I was running a 3-cluster Proxmox environment, I don't know where I got it from but you can use it if you'd like,

Save this script to a file, for example, proxmox_backup.sh, and make it executable by running "chmod +x proxmox_backup.sh"


Now you can add the above script as a cron job that runs every day at 2 am



I have another that does a backup of all the config so if your system fails and you want your settings you can run the below:
Again save it proxmox_config_backup.sh and make it executable by running "chmod +x proxmox_config_backup.sh" then create the cron job accordingly.
Thank you so much for the scripts. They are really useful. Apart from putting the backup every night at 2, I have made it to happen every 10 days. Important data is being backed up everyday.
I had a few follow up questions.:
1. I was looking to make a NAS (already hosting omv VM). Is there any Hard drive enclosure 2/4 bay that can connect to my mici pc's USB 3.0 port.?
2. Would it make sense to use zfs on above hard drives or just a raid setup for backup (as I have a few gb ram in spare)
3. Coming to hard drive, as the same would be used 24*7, could you recommend what type of HDD would be best suitable.? There are way too many views people have when it comes to HDD.
Thanks in advance
 
Hey,
I was looking to make a NAS (already hosting omv VM). Is there any Hard drive enclosure 2/4 bay that can connect to my mici pc's USB 3.0 port.?
Yes, you can. There are some 2 bay or 4bay enclosure available, you can look it up on Amazon, one specifically i have seen is from ORICO. I couldn't justify the prices though.
Would it make sense to use zfs on above hard drives or just a raid setup for backup (as I have a few gb ram in spare)
No, normally people say to avoid doing raids or zfs on USB enclosures, because usb is not that robust as SATA or something, usb enclosures are not intented for extended or continuous use, which Zfs will do while resilvering for example. You can look this up if you'd like.
Coming to hard drive, as the same would be used 24*7, could you recommend what type of HDD would be best suitable.? There are way too many views people have when it comes to HDD
Yeah, everyone you speak too will have their own preference, i personally abide by WD as I've seen Seagate drives fail a lot more often than WD drives. And there will be others who would say the opposite. I don't prefer using surveillance drives either but i know people who do use it in their home labs.
At the end of the day its your home lab do what you think is best for you and fits your budget there is no "industry standard" here
 
Man, I was also looking at the 4/5 Bay hdd enclosures. The Amazon reviews stopped me from doing so. Not so positive inspiring.
I dont know how the multi bay enclosures perform, but i have 2 of their single bay 3.5inch enclosure and they seem to be performing quite well for the past 10 months.
 
Thank you for your reply. Could you kindly elaborate on "backup the configuration"? With Home Assistant, I understand I can use the backup option of Home Assistant itself and while restoring, I can simply restore on a new instance, but would that work with nextcloud as well?

You have understood it correctly. There will be a way to restore the config in most cases. Check if that would be sufficient, it will save you from extra space, plus will help if you are going in IT-Sysadmin roles. Most of the idiots i know rely on something like veeam OR acronis and have no idea what to do if something is screwed.

I would suggest to containerize everything if not done, it will help a lot.
Proxmox does need monitoring — I run three clusters and I need to check them daily. Stuff still falls through whatever monitoring I do, like the other day I found out that my secondary adblocker was offline and I don't even know for how many days. I just set up portainer today (along with adguardhome-sync) to keep track of these little things.

Everything needs monitoring. My HDD started dying or something, the TV shows on it gone - and I didnt even notice for quite sometime. Recovering partially for now, since been ages since I worked on data recovery.
I have some experience in this, I fished out this script that I used to use when I was running a 3-cluster Proxmox environment, I don't know where I got it from but you can use it if you'd like,

Save this script to a file, for example, proxmox_backup.sh, and make it executable by running "chmod +x proxmox_backup.sh"


Now you can add the above script as a cron job that runs every day at 2 am



I have another that does a backup of all the config so if your system fails and you want your settings you can run the below:
Again save it proxmox_config_backup.sh and make it executable by running "chmod +x proxmox_config_backup.sh" then create the cron job accordingly.

I just setup a proxmox backup server on one of the hosts i have.
Thank you so much for the scripts. They are really useful. Apart from putting the backup every night at 2, I have made it to happen every 10 days. Important data is being backed up everyday.
I had a few follow up questions.:
1. I was looking to make a NAS (already hosting omv VM). Is there any Hard drive enclosure 2/4 bay that can connect to my mici pc's USB 3.0 port.?
Do you need lower power consumption? If not get a used desktop with PCIe and 4 SATA
2. Would it make sense to use zfs on above hard drives or just a raid setup for backup (as I have a few gb ram in spare)
Depends on how much you want to learn.
3. Coming to hard drive, as the same would be used 24*7, could you recommend what type of HDD would be best suitable.? There are way too many views people have when it comes to HDD.
Thanks in advance
24x7 operation would ideally need a server grade HDD, but you can get away with it if you are not going to hammer it with too much read writes.
 
Last edited:
I would suggest to containerize everything if not done, it will help a lot.

I just setup a proxmox backup server on one of the hosts i have.

Do you need lower power consumption? If not get a used desktop with PCIe and 4 SATA

Depends on how much you want to learn.

24x7 operation would ideally need a server grade HDD, but you can get away with it if you are not going to hammer it with too much read writes.
Thank you for your reply.
Will backup my configs as well as per your recommendation.
I am not inclined towards power savings but was looking to save a few bucks of another PC running as a backup or nas. But no matter what I think of trying, I get to the same solution, to get another PC for backup /nas (an SFF seems to be a suited option having sata ports and atleast a PCIe slot.)
I do have a follow up questions
1. What are your thoughts on Proxmox Backup Server as a VM? Is it even doable?
2. I wanted to try ZFS as my mini PC had some ram available and I read of ZFS providing good cache while accessing data. Learning is not an issue, but might need pointers here and there. Hope you and other community member would be able to guide a noob.
3. My use case is still to access some office files (including mostly of word docs and pdf) and to stream video content to various devices. Would a WD Red be able to pull it off?
Thanks again
 
Man, I was also looking at the 4/5 Bay hdd enclosures. The Amazon reviews stopped me from doing so. Not so positive inspiring.
If it's the case - I will suggest go for SAS Card (you can find it from Home lab device sellers); and go for Custom enclosure (either 3d printed or CNC or other ways). That will make the robust enclosure.

You can find videos related to multi-bay HDD arrangement within tower cabinet.

Just another perspective
 
DIY'ing also has the benefit of being tailored to your situation. in the past, I would salvage/buy hdd cages out of cases and rivet them together.
 
DIY'ing also has the benefit of being tailored to your situation. in the past, I would salvage/buy hdd cages out of cases and rivet them together.
The cheapest option today.
If you want to buy a hot swap HDD cage for multiple drivers today, it would cost alot. Rather it will be cheaper to just cannibalise an old case for the HDD cage
 
I've been trying to setup Proxmox on my old PC (ryzen 5 3600, 32 gigs 3200 mhz ddr4, rtx 3050) and turn it into a kind of do-it-all home server. I wanted it to be behave like a normal Windows 11 PC for when my dad wants to do some web browsing or play Flight Simulator, but at the same be running different homelab services on a linux vm in the background. So I've set up a Win11 vm to boot with proxmox, along with single gpu passthrough to the vm. To my surprise, this was really easy to do -- much easier than I remember GPU passthrough ever being in the past. It damn near works out of the box.

The only problem is that when you shutdown the Win 11 PC, I want it to return back to the proxmox terminal. But it doesn't do that out of the box, at least in my case with no igpu present, you just get a black screen because the vfio-pci driver remains in use and not the nouveau driver. I was able to use a hookscript that runs after the vm shutsdown to rebind the nouveau driver to the gpu and make it work. But this only works when shutting the vm down from the proxmox web gui. The hookscript does not activate when you shutdown from inside the Windows VM, making it useless for my purpose.

There's a few threads on the topic.

Someone posted a solution involving systemd and a python script. That looks workable. I need to try it.

Also, unrelated, does anyone know any good options for a cheap 2.5 gigabit switch?
 
1709213722439.png


Mostly finished setting up my first homelab server as a linux noob. An old 256 gb ssd I had lying around is used for proxmox/LXCs/VMs. So far it seems more than enough. I use NFS on the proxmox host to share a 1tb hdd, which will work as a temporary media storage until I upgrade it. I tried to set up OMV but this was way easier. Since my ISP has a CG-NAT, I'm using nginx on an oracle cloud instance (free) to forward ports. Nextcloud won't work without it. Then I have mullvad set up on the openwrt LXC to route all my torrent traffic through it. Not sure what else I want to do with it.
 
Hey Proxmox experts.

Disaster stuck 2 days back, I was trying to install a smart switch and had to turn off my mains power at home, once the mains was off within 5 mins my UPS failed and my Proxmox server was powered off.. once the server was booted back I noticed that the proxmox local-lvm status was unknown... the local-lvm had all my VM & CTs including most important HomeAssistant server...

I tried troubleshooting going thru few forums and google but nothing worked... I followed one of the guides which mentioned about changing the content type in the Prxmox hardware storage settings and rebooted the server and that is when I realized I had f**ed up, the server never came back online :( I lost all my VM and CTs and had no backups of these (which was my mistake, only positive note is my Homeassistant backup was available on GDrive)

Last 2 days I have spent hours with fresh installation of Proxmox and all the VMs & CTs

How could I have avoided this? what is the best way to backup Proxmox ?
 
Back
Top