 Hey guys, welcome back to DanielRosal.exe. So for today's video I'm going to be covering taking your own backups of C-Panel hosting. Now C-Panel isn't the name of a hosting company as most people watching this video are probably aware. C-Panel is just a kind of management dashboard for your website. This exists typically with shared hosting accounts. There are variations. C-Panel is a software and how exactly your host gives it to you is really up to them. So they can tie down certain features, increase certain features. It's at their discretion and it will vary a lot. So you'll find hosts that really lock down the features and others that offer more. The point of this basically is to take your own backup. So if we take a look at my GitHub master backup strategy repository that I've mentioned a few times on this, 321 is always the objective here. That means three extant copies of all the critical data, two backup copies on different storage media and one of those copies stored off-site. So if we're looking at hosting and if you get to come back to our schematic our primary data source in this case is actually a cloud. It's data stored hosting data which really means a big file system and that's stored on the infrastructure operated by the hosting company. We want to create two backups of that. So one of those can be on-site. I'm not going to actually get in in this video to the process of copying it over to my NAS, a network attached storage device because not everybody has an NAS. I didn't have an NAS up until a few days ago myself. But you can copy that onto your desktop or laptop computer. It's basically the same thing. That's taking an on-site backup of your web hosting and the reason I did mention the NAS is because this nice device, the cloud Synology 920 disk station has this nice tool called Cloud Sync and what it can do is sync between a local folder so that can be my on-site copy and sync that up to anywhere to another cloud repository. So what I'm going to be doing in practice and to be honest I mean I could set this up on my desktop too. It's just easier to run stuff like scripts, anything automated office server that's always live because you might turn off your computer at times. So it's always preferable to run scripts there. So what I could do this on my desktop but it's easier on my NAS to simply create a sync job between the folder that I put these backup copies of my hosting and another place on the cloud. And that'll give me two copies of my hosting data and I'm going to show you kind of a heavyweight way, the full backup methodology. I'm going to also show an incremental, actually an R-sync methodology. So firstly go into your C-Panel. I've logged into DanielRosal.tech which is not really much on this website. It's kind of I set it up really for demos. I'm not sure why I didn't buy something like DanielRosal.demo. Just to make some use out of it I threw on some of my posts about various tech stuff and backups here but that's really what there is. I imagine there's something like a gigabyte or so of data. Now what I did want to show is what you, you'll have a few backup tools typically in C-Panel. So my hosting company has provided this tool called JetBackup. JetBackup is kind of a backup tool that's commonly offered with your host offers is. Now there's a bunch of different backup tools so your host may have something else but this is kind of typical in that it's used, it's good for restoring rolling back changes, that kind of backup. So you've screwed up some changes on your website and you want to just kind of, you can see these are incremental backups and I've explained before the difference between a full backup, a differential backup, an incremental backup and R-sync. To reiterate incremental is a little, it's slice, slice, slice, slice, slice, slice, slice, excuse me. You start with a full backup and then every time the backup runs it's just saying what's changed, what's changed, what's changed, what's changed and that's why you see so many of these. So they're taking at various points in time. It's very, very, it's strength is that the slices are small. So in other words to roll back to the 26, it can, there's tons, it doesn't really take up so much room for JetBackup to keep a ton of these backup points. Look how many I have. Now I want to just check out something quickly. I'm going to pause this. I've downloaded this and I want to see where it exists and it exists on my hosting. So that's the reason I've mentioned this is because I think it's pulled down from JetBackup. I can't actually tell what the process was like on the back end but if it was stored in the web hosting then those backups are less reliable and that's because it's not, it's a backup stored on the same data storage media as the primary file system is always less desirable. So I, again, I'm not a JetBackup expert and I'm not, I didn't make this video to describe what it does. I guess it probably stores, pushes these backups to JetBackup server and then pulls these, pulls them down when you request a download but I don't know that for sure. I'm just going to delete the download. So that's what JetBackup does and as I said, the difference here is irrespective of whether they're on the server or you're pulling them in from JetBackup server, you don't have the backups, meaning they're living on the hosting. And the objective here, the mission if you want to put like that is for us to get our own copies. You always want your own copies, copies that sit in your house physically or stuff in a cloud that you own and that detethers you if you want to put it like that from this hosting company. So, you know, you, you're, they're doing a good job taking these incremental backups and that's lovely and to be honest, that's probably all you're going to need. However, you should still have, it's prudent to have your own data copies. So there's not really much to say about the rest of the JetBackup tools. That's the full one that I have, they do cron jobs, DNS, database, emails, various components, but it's all the same thing basically. Separate from that, you have this tool called Backup, and this is not a vendor tool, this is a cPanel tool. And what you can do here is download a full account backup. So I'm going to click this button. And what this will do is it's going to build for us a backup of the whole cPanel and we'll take a look at what that does and what kind of format that does, because it's going to be a little bit different than when we're doing an R-Sync backup. So you can do remote to remote backup. So you can specify the backup destination here as a remote FTP, or you can use scp. However, I'm going to do it, I'm going to keep it simple. And I'm just going to actually download to the home directory. Now, that won't be publicly accessible. But it will be without further ado, let me just get this running. And then we could then I can keep keep the talking going. So it says there's a full backup in progress. And what this is doing is it's building and we'll see this in a second. It's building the backup in a predefined format. And the strength now what we're doing here is we're taking a full backup. So let me see. Well, this guy's running full versus incremental versus differential backups. I should have done R-Sync. Acronis are always a trustworthy resource, one of the leaders in the backup and data recovery industry. We saw what incremental backups were a second ago, their little chong chong chong chong chongs. Each the, as he said, the advantages are lightweight, you can take many of them. Their deficiency is that if you wanted to back up all the way, they form a chain. So if we wanted to, if we were on Friday, and we wanted to back up to Tuesday's backup, we need Wednesday's, Thursday's backups to be incrementals to be intact in order to capture all those changes that have happened since Tuesday. A differential by contrast, so you can actually see the next step in the evolution. The evolution was from differential to incremental. Differential looked at all the changes since a full backup has taken and Acronis here use the same kind of mental trick to explain this that I've just done. They talk about the days of the week. So basically you would, if you're, the advantage of differential would be if you need to back up Thursday's backup, Thursday's differential is everything between the original full backup and Thursday. So you just need one differential to be intact. You don't have this chain like incremental backups. The problem, however, is that the, is that the backup images are naturally heavier because there's more data in each one. So it's a heavier strategy. So that's differential versus incremental. And what we're doing, the purpose of why I'm explaining this is just to say that these are the, these are the kind of more modern smarter and then you have our sync. Our sync is a, is a strategy basically for just comparing the, the data stream that's changed between two runs basically. So you could compare it, I guess, to, to incremental. And the our sync protocol can be used for incremental backups. For example, if you look at the time shift tool I've talked about for the next desktop, it uses our sync to that's the engine that it's running and it's creating. And that's how it creates a few different snapshots using. So those are like incremental snapshots. So basically, this is this. But what we're doing is waiting for this full backup. So this is, this is a heavy backup methodology. But on the plus side, these are kind of industry standards, industry standard C panel backups. And once we have one of these in our possession, we can give it to a host, it's formatted in a certain way as we'll see and that would allow them to restore it quickly. And that's of course, if it's on a, no, there are C panels, so comparable infrastructure. Okay, so I've just jumped to the root of my file system. And this is where these full backup goes. You can see as I was close enough, my prediction, it's about 1.4 gigabytes. So what I'm going to do is just go ahead and download. And you can see that it's tar.gz. That's just a common compression format for Linux file systems. So just download that. And I mean, that's really, that's really it, essentially. My host seems to have the slowest download speeds on this. Now you can also log into using FileZilla and FTP and just pull that down via FTP. I would then go ahead and put that on my network storage device, for example, and I could sync that up to the cloud. Now it might be a bit slow, based on the based on the speed of your upload connection. But that's basically all that's required in order to take full cPanel backups. This is a full account backup. So each time you're going to be downloading however much data you have on that cPanel. And as we'll see in a second when we do our sync, that means that we're basically unnecessarily downloading data and moving it up to another cloud. And you know, in these days, data and storage is all relatively cheap. So it's not so much about a cost thing, it's just that it's inefficient. We don't need to, if we run this backup in, let's say, the space of a month, we've added a few PDFs to this website. So there might be 30, 40, 100 megabytes of change data, the delta, in other words, delta represents change. So with approach like an incremental backup, for example, we could just download an incremental and put that onto our home system. Or we could use rsync, and that's what we're going to be looking at now. So I'm just going to basically put in the command here, that would be required. So rsync, and this is onto a Linux system, although there are solutions for Windows. But this video is really Linux centric, I guess, for Linux people looking to backup their hosting. This is one way, I'm sure that there are other ways. So this is, so put in rsync firstly, put in the rsync parameters, and these are the ones one I just looked up last night that were recommended. Now you open, if I'm connecting to rsync with a unusual port, so the syntax is, it's a single quotation mark to open this and SSH minus P. And then again, if you're using a non standard port, this is going to put in a few numbers, that's not the actual port I've been told to connect with my hosting, but that, you know, that's the format. And then another single quotation mark to close it off. Then basically you put in your SSH credentials. So your user, and again, this is obviously dummy. And then it will be your server's IP address. So just a few more random numbers that I'm putting in here. Then there is a semicolon, and then you're specifying the path from the root of the server. So usually, in a shared hosting environment, you're caged to within forward slash home, your user. Obviously, you can look in your file manager, in your cPanel and figure out what the particular nature of your hosting environment is and where you are relative to the root. And then basically, you just need to put it somewhere. So, for example, just build some path on your local directory. Now, if I was doing this on my NAS, it would be basically the same process, except that Synology have a tool for cron jobs. It's not like setting up a cron job on an actual Linux file system, but it does the same thing basically. So you would just create that. And I mean, this is just a command, but I could easily create a script and put this as a cron job. Okay, so I've gone ahead over here, and I basically just started this command replacing the dummy details for my real details. And as you can see, our sync is running and it's currently working on cage FS. Now, I did a very simple our sync. I didn't exclude directories. You can see it's taking stuff from my blogs about Erlingus and auto GTK and various stuff that we really we I'm sure we don't need this stuff in the backup the cage cage FS. So you can do with our sync, you can exclude directories. What I wanted to do was just quickly for this one demonstrate. And if you just do if you, you know, you can also just start with a with a simple our sync command. And then later you can add excuse me, I was just coughing there. Later you can add exclusions. And the beauty of our sync is that it's a source it's a source to destinations. Let's just explain. Just gonna actually stop this. What is occurring here is that basically we can run our sync again. And each time that we're running our sync, it's going to look at the source is going to look at the destination. And it's it's totally as I said, it's basically incremental. So it's looking at what's changed between the two the delta. And it's simply moving that over. Now we were just creating one backup here. By just keeping a remote source over SSH and our destination in sync, using our sync. But it's possible to create a few different, you know, you could create a few different folders on your computer. You know, give them timestamps to represent the dates. And then our sync into those. I'm just going to also reference before I finish the video, because I thought this needs a little bit more explaining the way to, there's a good blog I just found here from Mark Sanborn. He explains basically the way to use our sync just the command line interface, nothing more sophisticated, installing it on Ubuntu. And as I said, there is there is a there is a Windows equivalent for this basically, he starts with creating a the sync that we just did with our web hosting, and then creates a weekly incremental backup. And he does this by adding the delete flag. That's important. And syncing between the daily just between the daily and the weekly. So you start the rsync with the daily. That's the main sync. And then once a week, you create a weekly folder. And then you're thinking from daily to weekly. So the only delta is going to be the difference between the daily and the weekly. Then he creates a full monthly backup. So this is leaving the incremental approach. There is one incremental backup point created here every week. And as I said, sync firstly, then add the deletion flag, and then moving from that to the daily and then capturing that into a weekly backup point. Then finally, bundling an archive together. And that's creating a full backup monthly. So you can vary that approach, but that's a way to use your rsync. And of course, you can add, you don't need to just stick to daily, weekly, monthly, you could have daily rsyncs and then create a script to just capture the delta between every day, running it every day. And that would build for you a incremental backup set. And you could also add the full backups as well. So that's basically it. Those are the two methodologies you can employ for building full backups from your cPanel based hosting onto Linux system. Or if you prefer to use incremental backups using the rsync command line interface, in order to again, build those incremental. And as you mentioned, the final component in the three to one backup strategy needs to be adding it to another offsite. And you can you would basically, you know, just build out a some kind of a sync between, let's say you're using this, you know, your rsync folder and then just creating a sync between that could be also done with rsync up to another clade bucket. And that would get you your offsite copy of all those incremental backups too. Thank you for watching. And any questions or comments or feedback. This is the GitHub page. As I said, I'm also available at DanielRosso.co.io