How to backup Proxmox virtual machines using USB drive

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone kevin stevenson here with get me the geek.com and today we're gonna do a little bit more proxmox fun so imagine the situation is is that you want to back up your proxmox and a lot of times i'll do that to a freeness through an nfs store or you know backing it up to a secondary computer device like that now sometimes you might be just running with one proxmox machine and maybe you don't have all the another whole another computer or whatever so what you can do is take a usb drive plug it into that proxmox and back up using that and that's what we're going to show you how to do in this video so let's get started i'm kevin stevenson with phaselogix we're a managed it services provider if you'd like to hire us for projects go ahead and check us out at getmythegeek.com if you find my videos valuable go ahead and subscribe and like if you like to support me directly go ahead and buy me a coffee here we go so first off here is my proxmox machine if you notice i have already plugged in the usb drive and so it shows up right here as a usb drive now the question is well what do i do from here can't just go and do added is a storage device at this point time because that directly from the at least the web interface you can't really do that so we're gonna have to do a little bit of command line fun that's what we have right here so the first thing we need to know know is what is that device now we did look here and we see that as an sde so we know that e is the device id so let's go ahead and just type in ls blk and that's going to give us let's make this a little bigger for everybody's fun so you see all of these devices sd a b c d and e so we already knew that e was the one we're looking for and so there is my one terabyte ss3 d drive so that's step one and also one of the things i recommend you do is you look at your usb connectors on your proxmox machine so if you have an older proxmox machine it may only have usb 2 ports or it may have a mixture of usb 2 ports and usb 3 ports so let's just check out how to find out event ls usb will show you the usb stuff now if you look right here closely you're going to see that my machine first off first item on there is the seagate usb drive second item on there is linux foundation 2.0 root hub and and so you'll see a one and as you go down through there now you will notice that there is not a usb 3 or 3.1 or whatever on this machine so keep in mind even though i am plugging a usb 3 usb drive in there it is not going to be able to transfer speeds at usb 3 speeds because the computer itself is not capable now this is important that you make sure that it's plugged into the right port if you do have a usb 3 port and especially if you have a mixture of two and three now you'll see here that bus number three is the one that is plugged in and it is the usb 2 hub and so like if i was plugged into bus eight i would be running at usb 1.1 speeds and we definitely do not want that so now that i have it plugged into the make sure that i have it plugged into the correct hub let's get started with our next step we want to check out that drives formatting so we'll do fdisk dash l if i type it in correctly now we're going to look through here and here is sde on our sde one terabyte drive which happens to be the last drive in it but it's very convenient for us and i will you will see that it is set up as basically for a windows partition ext fat dfs hp hf hpf we want to i want to change that to ext4 because this drive is going to stay in this machine and be our backup drive for the machine so the next thing we're going to need to do is go ahead and format that guy so m k f f s dot e x t well actually let me let me just clear this so you can eat up high here and so we're going to do it mkfs.ext4 and then dev sd e 1. that was the partition let's go ahead and do that and it says contains an ntfs file system labeled cgad expansion drive you want to proceed yes i do and bing bang boom we are riding ext4 today and we'll take just a few seconds okay so let's go ahead and take a look so let's do a vl kid dash list and this is going to list all this stuff we're looking for sde one so if you scroll through this list you're gonna find sde one there it is not mounted and it is set up as an ext4 now also you notice this uuid we're gonna we're gonna use that later alright so let's just do clear so now what we want to do is create a directory to mount that usb drive so i'm already in the m t so if we do a print working directory here we're going to see that we're in the mounted directory and right there there's some stuff but basically mnt that's where i'm going to mount it that's going to be the permanent location so let's create our directory there and we're going to call it the usb drive and so you'll see it there uh and it's directory and so on and so forth now what we want to do is we want to go back and we want to check out that uuid because we're going to need that to set up a permanent mount reason why we want to use the partitions uuid is because if we plug other usb device drives in there or change the drive configuration in this machine that sde 1 may change to f or g or something else and we'll have a failure on mount on a reboot possibly so let's avoid that by using the uuid so we do that by doing it this command right here i'm just going to copy and paste it and basically you're going to list the devices the the disk devices by uuid and here we go and then again we're looking for the sd e font so as we scroll through here we're gonna go ah right here it is this one right here that highlight so what we want to pay attention to is this we're going to copy this right here now that is copied and i'm going to paste it right here in just a notepad just to keep track of it we'll use that in a minute now we're going to go into our fs tab fs tab will be all the mount devices so let's just go ahead and tape it i use nano you can use what ever editor you prefer i just like nano because it's quick simple and easy all right so here we are on the fs tab what we want to do is we want to mount this so we're going to add land in here and i'm just going to paste that in here dev disk by uid uid mount location format okay but now we're going to go back and i'm going to pull up that uuid and i'm going to fix that's the uid that we had and then we're just gonna control x it's gonna ask to save yes i wanna save same file name blah blah blah boom now we do a df-sh you're going to notice that it is not done yet so let's just clear this up again and boom so mount dash a is just going to run that that fs tab and it's going to mount it so now if you take a look here we have a one terabyte drive mounted in our usb so now we can go over here and we can just go look at um usb all right usb boom and there we are lost and found so it's got some lost and found stuff in there um we're gonna have to say okay the ir test there it is um all right so next step is we're going to go into the proxmox now that we have it mounted let's go ahead and pull up our proxmox so now if i reload this going to see sde mounted all right so that's under our disk now we can take advantage of that and turning it turn it into a backup storage you want to go here to data center storage add directory let's choose directory and we're going to call it uh local that's usb and minty plus usb dash drive so that should match this guy right here question is do i have my slashes in the right direction let's just choose all these things here i can never remember i'm gonna choose three big add oh see it's an error now let's go back and the reason why that is because those slashes all right boom there we have it now you'll notice right over here it is expanding that so let's just let's just make this bigger um so now usb local is there summary 900 gigabytes basically all free content is nothing let's just go ahead and upload an iso image to that somewhere i think i believe i have something in my downloads which we can just say oh here's a virt io which is something that's totally useful so boom we're uploading that iso image to this usb drive and it it is a directory that can be treated just like anything else and now boom okay so say we want to go ahead and use that as a backup let's just take this machine right here camino and we're going to go and click backup now this is my normal backups for this but i can click back up now go over here and see this usb drive as an option um we can choose the fast and the good snapshot is totally fine and then email uh we're just gonna leave that blank but you know if you want a notification go ahead and fill that out because you will get a notification uh when the update when the backup completes with a big log of that it's totally useful information let's just go ahead and hit that back up right now boom so here it is we're gonna go ahead and i'm just gonna let this finish and we'll watch it and we'll probably just do a fast forward and i'll zip to the end all right so there we have it we backed up that virtual machine to this usb drive and if you haven't done this before you'll see that it tells you roughly how long it takes and how many megabits per second and the archive size and all this other stuff um just remember like i said usb 2 on this one so it's going to be slower so your your results will vary depending on your hardware um and if you haven't done it before let's go ahead and look at scheduling so if you if you notice before when i did this i set it up for a number of backups so let's go to backup and if you see here i have this backup scheduler it's not going to mess with that one we're just going to go ahead and make another one here and do this we're going to usb local and we're going to do this on every wednesday at let's just do a 1800 hours you select a vm we're going to select this guy right here and if you want the emails it's all good always only on failure and so forth snapshots so on and so forth and then we just hit create so now that will back up every wednesday and it will just back up that one machine and you can just choose whatever you want as whatever your needs are i'm just going to choose this as an example here for you and that's it all right so i hope you got something out of that and if you're looking like i said there are many things you can do here if you're looking for a way to back up that proxmox virtual machines and you don't have a nas to go to and maybe you want to have a usb external drive connected to that so this is a really good option just remember uh sometimes sneakernet is faster than ethernet so that is one of the reasons why i do that so i can take that usb drive unmount it plug it into another proxmox temporary prox mark machine and then mount it and then do a restore and bing bang boom it's fast updated so if you have a big backup like maybe a multi-terabyte backup that you want to trick that you need you need to be able to transfer to another machine and you don't have it set up in a cluster for failover this is a good option for you also you can unplug that drive and then take it off-site so if you need an off-site local backup so sometimes back in the day backups tapes and things like that were taken out on a daily basis and taken to a bank vault for off-site backups so this is a this is a way to do that maybe you need to have a disaster recovery plan that requires you to have off-site backup and cloud is not an option for you so things to consider and this is an option for you i'm kevin stevenson with phaselogix you can find me at getmegeek.com thanks for joining me
Info
Channel: PhasedLogix IT Services
Views: 20,883
Rating: undefined out of 5
Keywords: GetMeTheGeek, PhasedLogix, freenas, truenas, Linux, proxmox virtual environment, proxmox, proxmox install, proxmox virtual environment tutorial, proxmox ve, proxmox tutorial, virtualization server, proxmox ve tutorial, virtual machines, virtualization, server, debian, linux, vm, virtual machine, create a vm, desktop, virtual private server, open source, how to, Tutorial, Howto, home network, proxmox backup, backup virtual machine, backup, vm backup, how to backup, learn linux, usb backup
Id: lZjMxdBPH7M
Channel Id: undefined
Length: 18min 17sec (1097 seconds)
Published: Thu Sep 10 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.