Off-Site Remote Storage Backup - TrueNAS Scale, Tailscale, and rsync

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
ladies and gentlemen it's 2022 the digital age is heavily upon us meaning that more and more data is getting created every single day whether that's photos videos important documents or the personal information from everybody on the planet now I don't know about you but I have a lot of digital assets that are irreplaceable which is why I have a backup but what happens if one of my YouTube videos is an absolute Banger and burns the house that's why today we'll be setting up an off-site remote backup solution so that in the case of a disaster I still have all of my digital assets backed up to a remote location so that's what we're going to do today utilizing truenast scale tail scale and rsync so let's go ahead and get started all right let me preface this by saying this is not the only way to accomplish setting up a remote backup solution there are plenty of other ways to do it there are plenty of guys out there this is just the way that I've chosen now I've gone with true Nest scale you don't have to go with that the general idea for this is the same whether or not you used your net scale or not but if you're using true net scale like me setup is relatively easy just follow the general setup guide then go about setting up true charts which is like five or so steps I'll link all the guides in the description below I'll have my own written guide in the description below as well if you want to check that out but we'll be using true charts to set up a repository to allow us to download tailscale which is the next important step tail scale what is it it's essentially a self-hosted VPN service that allows you to connect computers to each other or networks to each other regardless from their physical location or where they're at in the world I guess that is physical location but tail scale is going to allow us to easily connect our server based on our home network to our remote server which I will deploy at a friend's house the first thing you'll do is go to the tailscale website and set up an account once you've done that there's not really much you can do until you've set up the tail scale service on at least one machine so that's what we're going to do so assuming you've added the true charge repository you should see the tailscale application available to install so go ahead and do that and we'll walk through the few things you need to change to get set up and going obviously we're going to give it a name and auth key is your API key that you will obtain from your tail scale administrator dashboard on their website so go ahead and create one of those copy it because you won't be able to receive it or see it again so copy it put an essay place if you want to use it later you can always generate another one if you want but yeah next is routes which are extremely important because by default the only two things that we'll be able to talk to each other are the services running tail scale and in this instance we have tail scale running in a kubernetes cluster on trueness meaning that essentially the only thing that we'll be able to talk to it is the tail scale application itself we don't want that we also want to be able to communicate with our base truenast system where all of our storage is so that's where routes come in handy routes essentially allow you to communicate with a device or an entire network outside of the tailscale application so here you can see we are specifying 10.0.1.35 with the subnet of 32 meaning that we only want to expose this single IP and that IP is the base IP address of our trueness scale now we can access our true Nest scale application through tail scale from wherever eventually we'll get there but my use case may be different from yours if you want to specify an entire network you can change this to whatever subnet you're using and expose your entire network if you want but for my use case I only care about exposing our true Nas instance so that's what I did now one thing to note is that after you specify a route and start the tail scale application you're going to have to go into your administrator dashboard and make sure that routes are turned on for that specific machine and you only have to do this once I found that sometimes it will spin up a different machine ID and you may have to go in and do it again but for the most part go in there go to edit routes and make sure that is turned on and aside from that the settings I pretty much left to default I set my local time zone and then honestly everything was left untouched you can go through here and change whatever you need to depending on your use case but from me everything else being left to default was perfectly fine so once I did that spun it up tail scale is active everything worked perfectly fine so what's next well honestly at this point you could go deploy your backup server to its remote location and ensure that it's running with the correct IP address and tail scales up and running and you're good to go but it's probably best to do everything locally and make sure it all works before you drive however many miles away to deploy this thing so what we're going to do is install tailscale on my MacBook log into a different VLAN and make sure that I can communicate with my backup server so obviously I've already done this for testing purposes I have the tailscale app installed on my MacBook go ahead and connect actually first before I do that let me connect to a different VLAN and show you guys that I can't actually get to my true net scale instance and when I connect to tailscale I should be able to which can confirm that it is working okay we're on a different VLAN now and if I try to ping my true nest scale server you can see we're timing out we can't reach it so let's go ahead and connect to tail scale we are connected now let's try to hang and just like that we are connected to our backup server over the tailscale VPN now I know you're thinking oh you're in the same house on the same network big deal well we're on a different VLAN so this is essentially simulating being on one network and deploying to a completely separate one whether that's in a VLAN or completely remote so yeah we're good here now just to show you I can't access anything else on that subnet let's try to ping my main proxmox server nope can't reach it and that is because we specified the subnet of 32 which is only a single IP address at this point I think we're ready to bring the backup server to its final resting place from there we'll have to tweak a few things mainly just the IP address because it's probably not going to be the same once we deploy it to somebody else's network but we'll worry about that we'll get there and once that's done we should be able to come back and set up all the rsync configuration that we need as well as tailscale on our main server so just keep going all right so I mean you gotta be silent if you're here or go play somewhere else how are YouTube videos are made all right we've traveled across the hottest deserts the most treacherous mountains the deepest oceans and we're finally here at our remote site okay actually we just traveled like right down the street uh my friend lives in like the same neighborhood but it's the same concept okay hello all right so the machine is set up right here uh you're probably gonna see it but I'll put in some b-roll or something but yeah like I said before when we deployed at a remote site the IP address is going to change so right now you can see we're logged in through 192.168.86.45 which is clearly different than the one we had before so I mentioned that we do have to go in and make some slight modifications so what I did was go into the apps go into your tailscale configuration edit and remember how we set the routes before with our IP address we'll just change it there to the new IP address make sure that it's static so it never changes you wouldn't want to deal with that but once you do that and update it tailscale doesn't care just restarts it with the new IP address for the new route but remember how in the tailscale admin console we had to accept that route the first time well this is a new one so if we go in here you'll see that it is now grayed out meaning that it's asking for us to accept that again we'll go into edit route settings turn on the new one or remove the old one and turn on the new one that should be updated and to test this out I will show you that we will connect to a hotspot so we are using my iPhone as a hotspot meaning that we are no longer connected locally to my true Nas server and if I try to Ping it we can't reach it so we'll now sign into tailscale on my MacBook we are logged in and now if we are connected I should be able to successfully ping nature in our server now we've proved that our server has been deployed on a remote site we can connect to it from essentially any network meaning that we are free to go back home and set up the rsync backup service the last thing we want to do is actually confirm that we can sign in to our true NASA server because once we get back home we want to at least access the true Mass GUI so let's just double check that we can do that we're in still connected to my hotspot good to go all right we're back and we've confirmed that we can access our remote server through tailscale now the last step is to get our main server set up with tailscale so that the two can talk to each other and then we'll set up rsync to make sure all the data is transferred back and forth will actually just fourth now if you're also running through Nas on your main server then it'll essentially be the exact same steps and then go through and set up replication or rsync or whatever type of data migration you want but in our case we're actually running this on proxmox so what I've done is actually spun up a Docker instance I'm running portaner and what we're going to do is install tailscale using Docker compose so if we go into my portaner instance you'll see that I've created a custom template for tail scale let's take a look at it and it's actually a pretty simple Docker compose setup if we look here you can see we've specified a name for it we've specified these volumes that are pretty much unchanged from the documentation and then the only thing you'll really change in here are the routes and the auth key so remember before we had to enter our authorization key as well as the routes well that's no different in Docker compose so set that up we've deployed it it's running one thing to make sure that you do is to not miss the network mode set to host that'll make sure that we can actually access our local network so that our routes will work and if you've set things up correctly then shouldn't have any issues if we go back into our proximox instance we'll see if we can actually ping our remote server so it was 192 to 168 86 86.45 and just like that we can ping it meaning we can access it and even still here it is the truenast dashboard this is the one that is remote it is not in my house and we can still access it as if we were sitting directly in front of it last step I know I said that before but actual last step is setting up rsync now there are other ways you can go about moving data from one place to another you can do replication through ZFS you can do sync thing which I personally use as well but we are going with rsync and the first thing you're going to want to do is set up the module on your host device now our host device is proxmox a container running in proxmox actually so let's go in there and take a look at what we've done now we're actually going to run rsync on the base proxmox operating system now I know we have Docker running in a container but we're going to run Arsen tank on the host so what you're going to want to do is actually create an rsync configuration file you may have one already created for you automatically but you may not so you're going to want to go ahead and create one the rsync file is going to be in the Etsy directory so go ahead and CD to Etsy and then you're going to run Nano or Vim or whatever text editor you use in rsync D dot c-o-n-f once you do that it'll either bring up your file or create one for you I had to create one myself and you can see there's not much to it because we are running a very simple configuration what you're going to want to do is in the brackets up here give your module a name this can be whatever you want mine is called main ZFS then you want to specify the path that you want to access so this is our main server that we want to pull from and all of our data is located in this Mount directory main ZFS and you can give it a comment so if you get Alzheimer's you don't forget get what it is so yeah it's extremely simple I know so let's get out of here and I'll just show you guys if we look at what's in that directory you'll see that is all of my data I've photo prism I have syncing data and I have backups for all my VMS as well as proxmox backs up backsups backups so yeah after that go ahead and restart our sync system CTL restart rsync and just like that restarted picked up our configuration and the final and absolute last step is to configure our sync on your remote server so luckily intrudas is extremely easy go into Data protection and go into rsync tasks here you can see I've already created one and let's take a look at it and here's where you can specify how you want rsync to act first thing is a source where you want the data to be stored on your backup system so you're saying I want to pull from my main system and I want to store it somewhere on my back backup system so here I've given it a location of Mount beans backup don't ask why specify the user you want the rsync task to run as direction is this going to be a pull or a push so we have it in a pool configuration meaning that the remote directory is going to pull data from our main system on our local network give it a description give it a schedule how often you want it to run remote Host this is going to be the IP address of the server you want to pull from in my instance it's on my local network which is in the subnet 10.0.0.1 and the IP address for my server is 10.0.0.43 we want to use the module name for rsync you can either do that or SSH I found that module works better and then give it that module name that we specified using the configuration on our backup server or on our main server and then there's a couple of attributes here I'm not going to go over what all of them does you can kind of hover over and it gives you a brief description but I've left compress on just so that we can get the most out of our rsync Command because this is over the network this is over the actual WAN network so we're going to want as much help as we can get and then save it and you can let it go or you can just run it boom our rsync task is running and it will take uh a little bit well it's been a few days for two reasons one being that my camera actually died when I was filming the conclusion to this video so I lost pretty much all the footage from that bummer but it was kind of a blessing in disguise because I then realized that the way we had it set up wasn't actually working the way I thought it was let me explain so remember when I said we'd be deploying a remote server and using a pull configuration meaning that it essentially phone home and pull the data back that it needs well it didn't really work when we deployed tail scale using the true charge repository I don't know if this is a kubernetes thing or a true charts thing but essentially when I had it set up the truenast scale server couldn't phone back home now I could go through the tail scale network from directly inside the kubernetes cluster but the trunass server Network actually sits outside the kubernetes cluster so unless you are really good with kubernetes networking it was a pain and I couldn't figure it out so it just didn't work in the way I had it set up but if you're running true Nas on your home server and you wanted to push the data to your remote server it works perfectly fine I can ping from my home network to the remote server just not backwards so what did we do well trunes scale is based on Debian and has Docker installed by default so all I did was spin up the docker container for tail scale directly on the host system and after a couple of commands my tail scale was run running directly on the true Nest host Network true Nest true nasty true Nas host Network and from there I can now ping from the remote server back home and vice versa and then when I went into rsync and tried to do a pull everything worked perfectly fine so yeah this didn't really turn out as I anticipated but I definitely learned a couple of things so but if you wanted to go like what I initially did you could use a push configuration everything would be perfectly fine if you have a setup like mine and you want to use a pull configuration I didn't have much luck with the true charts and tail scale setup but I did just set it up through Docker on the host system and it was pretty easy so you could do that if you want but yeah it works am I happy with it kind of I mean it works I wish it was a little bit sexier but you know as long as it works then oh well but yeah I'll have much better documentation for this on my website link in the description below but yeah that is going to be it let me know down in the comments what backup solution you guys use and hopefully it's more elegant than than mine but uh yeah I'd be interested to know what you guys use so sound off down in the comments but that is it I hope you liked this video if you did drop a like if you like content like this or just looking at my face then please consider subscribing it helps the channel a ton but I want to give a huge shout out to my patreons and my YouTube members you guys are my remote support system that can easily be accessible through the tailscale network no matter how you deploy it so you guys are awesome that is it if you are still around thank you so much I appreciate you guys watching and I will see you in the next one [Music] foreign [Music]
Info
Channel: Raid Owl
Views: 42,750
Rating: undefined out of 5
Keywords: homelab, data storage, tailscale
Id: o2MX10C8Ez8
Channel Id: undefined
Length: 19min 16sec (1156 seconds)
Published: Thu Sep 08 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.