Backups in ProxMox


In Hyper-V, taking backups was, welll, not very pleasant.  It was fine if you had a dedicated backup solution, but for a small set of VM’s like I have, it require basically taking snapshots of each individual VM and exporting them.

Microsoft didn’t make the process very easy, but with a bit of PowerShell scripting I had a pretty good system in place that kept the VM’s down only for as long as it took to export the disk images.

ProxMox on the other hand has a built in VM backup system that looks like it will automate most of the things I had scripted.

However, the first thing that becomes a problem is that by default, ProxMox stores the backup images on the boot drive, which is only 80g in size.  I installed a 1TB SSD to host my VM’s so that math doesn’t work very well 😉

I had upgraded my main data drives a while ago from some 2TB HD’s to 6TB HD’s and those old drives have just been laying around, so I decided to add them to the host servers as backup space.

My first attempt to do this was to create a new LVM storage group add them to the ProxMox server as a new storage group, but it turns out that doesn’t work as you can’t use an LVM disk for backup.  Instead I had to simply create a ext4 file system on the disks and mount them to the ProxMox host server.  I found this article useful, with the exception that it’s a little old and suggests ext3 still.

Once the drive was mounted, going in to the ProxMox web interface, selecting Datacenter->Storage->Add->Directory brought up the standard dialog to add storage to the system.  One item to note is that since I have two nodes in my cluster, you have to connect to the node that has the local drive on it.

There some standard fields to fill in, like the ID, which I labeled “backups”, note that creating a directory store in ProxMox will assume it is available on all nodes, not just he current one.  Make sure to select the right content type, for me I only selected “VZDump backup files”, but you might want to also support other things like ISO images or container templates.

The other item to note is the “Max Backups” field, this sets the maximum number of backup images that are allowed on the disk for each VM.  Once this number is exceeded the old backup files will be removed automatically (at least if I’m reading the documentation correctly).  For me, I set this to 3.

The final step is then to setup a backup schedule.  To do this, select the host Datacenter->Backups->Add.

Since this is backing up to local storage, the first option “Node” should be set to the physical node your backing VM’s up from.  Then you can simply select your newly added backup storage, what time you want the backups to start and which VM’s to backup.  The rest of the options are straight forward and now you have a weekly backup of all your VM’s.

I also keep a copy of my backups offsite, which is easy to do as you can just sftp a copy of the backups from your /mnt/backups/dump directory and move them to a USB drive or other storage to take with you.

One last point, as mentioned above, my main file server has a 6tb drive, which of course can’t be backed up to a 2tb disk.  I have a separate set of backup disk for this and so I don’t won’t ProxMox to backup that volume.  Fortunately, if you go to [Your VM]->Hardware->[Disk you want to exclude]->Edit, you can select the “No Backup” checkbox and it will not be included in the ProxMox backups.

Update: Remapping keys in Linux


In my previous pose, Remapping keys in Linux, I provided some instructions on how to make the right control key act like the menu key.  However, one issue was that you have to run the script after each login.

That’s more than just a little bit annoying, so I’ve tracked down how to solve that as well.

From this AskUbuntu post, it turns out that xmodmap is no longer used and instead xkb is what really needs to be updated.  The process is simple enough, edit:


find the following block of text:

 key <RTSH> { [ Shift_R ] };
 key <RCTL> { [ Control_R ] };
 key <RWIN> { [ Super_R ] };
 key <MENU> { [ Menu ] };

And change <RCTL> to Menu and <Menu> to Control_R.

Reboot and voila, the right control key now works like a menu button.

Of course, this is system wide so if you have multiple users logging in, they all get this.

One note is that the linked article does mention to delete the compiled keymaps, but there were none on my system so there was nothing to delete.


Update: OpenVPN GUI on Linux


In my previous article I mentioned a few things you need to do to setup OpenVPN in the GUI on Linux, but there is one more item.

After using the VPN a few times DNS seemed to be an issue, as Linux continued to use the WiFi DNS settings in stead of the VPN servers.

Several articles mentioned that you should edit the /etc/NetworkManager/NetworkManager.conf file and make sure the “dns=dnsmasq” line is in the file.

However this article says the exact opposite and it seems to be correct.  As soon as I commented the line out of the config and restart the Network Manager, DNS worked as expected.

Alt-Tab in Zorin


By default Gnome groups your application windows when you press alt-tab, so for example, if you have two file explorer windows open, you only see one in the alt-tab list.

If you want to swap between those two file explorer windows, you can alt-tab and then arrow down or you can use alt-` (or whatever key is above your tab key on your keyboard).

That’s kind of intuitive and worse, it takes a lot of extra keystrokes.

To “ungroup” windows in the alt-tab switcher, simply start the “Tweaks” utility, go to the extensions group and enable the “Alternatetab” extension.

Now all your windows show up when you alt-tab.

Remapping keys in Linux


My ZenBook 3 has one minor issue I really take to heart, the menu key (on the right hand side of the space bar) is a secondary action to the right control key.

That means to get the menu up from the keyboard requires a Fn-Right-Control sequence which is annoying to say the least.

In windows I had remapped it with a third party app as I don’t really use the right control while typing and so in Linux I had to find a way to do it as well.

Fortunately, Linux comes with xmodmap which can do this.  You can go to this article to get more details about how to do it, but the short answer is:

xmodmap -e "keycode 105 = Menu"

Then save it to your local xmodmap file:

xmodmap -pke > ~/.Xmodmap

Then add it to your .xinitrc startup script:

if [ -f $HOME/.Xmodmap ]; then
 /usr/bin/xmodmap $HOME/.Xmodmap

And your done.