How to backup my server?
Hello
Apologies in advance for my lengthy post but I wanted to be verbose to make finding an answer easy.
I'm not sure what is the best way to backup my server!?!
Background to problem:
After having recently opened another thread here on the cPanel Forum. One of the cPanel engineers kindly logged into my VPS server and told me the problem was my web server's HDD was about to fail. So obviously I need to back it up ASAP.
I contacted my web server provider and they told me that backups was my responsibility. (oh the joy!) I wrongly assumed this would be done automatically.
This is what I did next:
Attempt #1: FTP backup to local machine using WinSCP.
I simply tried to FTP my entire server (36GB) down to my local machine, but after 6 hours and 9GB my ISP strangled my connection to less than 50Kbps from 25Mbps. This meant I was unable to load even simple webpages in my browser. The backup would take weeks to complete if they kept choking my connection, thus making this option impractical.
Attempt #2: WHM backup to Amazon S3.
I read this cPanel thread:
How to configure Amazon S3 backups in WHM
So
[LIST]
I opened an Amazon S3 account.
Created a Bucket.
Created a user. (I was prompted on screen by Amazon S3 to stop "financial" abuse).
Saved my Credentials i.e. Access Key & Secret Access Key.
Then I went into:
WHM > Backup Configuration > Additional Destinations > Create New Destination.
Filled in the form:
[LIST]
Destination Name - gave it an arbitary name.
Transfer System Backups to Destination - ticked this checkbox.
Folder - gave it an arbitary name of VPS_backup. I also tried without a folder name but it made no difference.
Bucket - name of my bucket.
Access Key ID - the key Amazon S3 provided.
Secret Access Key - the key Amazon S3 provided.
Timeout - 300 seconds (max length just in case).
I made sure backups was enabled for all my users.
BTW legacy backup is turned off??? Why? What's the implication?
I clicked "Save & Validate" i.e. connect to my S3 account. But I can't get the configuration to work. I keep getting an error message. validated failed (see attachment 01)
I don't know what I am doing wrong???
Attempt #3 FTP back to my Server Providers "FTP backup storage".
So I contacted my hosting provider and asked them for help.
They recommended that I purchase some disk space on their "FTP backup storage" Which I did.
("17 pcm. Anyone know how this compares to Amazon S3 price wise???)
However they said it's for me to perform the FTP backup. (oh the joy!)
They furnished me with these basic instructions:
How do I configure scheduled FTP backups in cPanel? | 123-reg
But I don't understand the caveat at the bottom about having to create an FTP account. (see attachment 02)
When I emailed my hosting provider for clarification they said I should use FTP from within my server??? (see attachment 03)
And to follow these instruction
Connect to FTP/SFTP server which can be accessed via another server only :: WinSCP
My problem is I have very limited knowledge of FTP. I don't know what to do!
Question 1
I watched this video on YouTube which shows how to backup a website:
youtube.com/watch?v=Xxvn5D7QTFc
Should I do this for each website on my server before attempting to FTP it off the server?
Question 2
Is there a way to backup all the websites in one go from with WHM? Rather than having to back them all up one by one, via each websites cPanel login?
Question 3
How do I create the FTP account on the "FTP Backup Storage"? My server provider gave me 3 new credentials:
- ]
- A hostname
- A username
- A password
-
Hello :) The first step is to configure backups to the remote FTP server via: "WHM Home " Backup " Backup Configuration" We offer a full document on this at: Backup Configuration - Documentation - cPanel Documentation Under "Additional Destinations", choose "FTP" as the destination type. Your provider will need to provide you the specific hostname, username, and password for the FTP storage you selected, as any FTP accounts you create on the cPanel server are separate from the remote FTP storage you purchased. Please let us know if any issues persist with this step before we proceed with the next step in this process. Thank you. 0 -
Hi @cPanelMichael Thanks for replying. I think I've just managed to perform my first FTP backup to the remote backup server. I opened the cPanel of each website and performed a full backup. I got an email each time to say the backup was successful. But this just created a tar.gz file in the "home directory" of the website. (The same HDD thats about to fail.) Again I realised my ISP would choke my download(s). So I then changed the destination to "Remote FTP Server" using the logon credentials given to me today by my web host. I took a gamble on the (Passive Mode Transfer) option, whatever passive means in this context??? I got an email to say the backup was successful. When I look in the home directory the 2nd backup or tar.gz isn't present. Therefore I can only assume it's been FTP'd over. But I don't know how to log on to the backup server to see the actual files because the logon credentials are "unusual". (See Attachments) Cheers 0 -
I took a gamble on the (Passive Mode Transfer) option, whatever passive means in this context???
You can find an explanation of this at: How to Enable FTP Passive Mode - cPanel Knowledge Base - cPanel DocumentationBut I don't know how to log on to the backup server to see the actual files because the logon credentials are "unusual".
You can use a third-party application such as Filezilla:0 -
Even R1soft is a good option if you are looking for remote backup storage. 0 -
@cPanelsMichael Thanks once again for replying. OK it was simple in the end. (isn't that always the case?) I had to log on to my VPS via PuTTY. Then from the command line I typed: > ftp > o > [hostname] > [username] > [password] This established a connection to the FTP backup storage. I didn't know you could FTP from Server A to Server B. Is this what they call FTP tunneling? The result is my backups worked. (phew!!!) They are all stored safe and sound on the FTP backup storage. And not a moment too soon, because just 30 minutes later my VPS went down! Now to fix the VPS, I will leave that to my hosting provider. Cheers. 0 -
@webhostuk I will look at R1soft pricing. Thanks for the tip. 0 -
r1soft is great but don't rely on it 100% ( form experience) always have normal backups via cpanel backups or rsync although since its last buyout it has worked 100% flawlessly 0 -
Hello. The best option is do backup to sftp or s3 server 0 -
I didn't know you could FTP from Server A to Server B. Is this what they call FTP tunneling?
I'm happy to see the backups are now working as expected. This is simply a FTP connection and transfer. FTP tunneling is described at: FTP Tunneling Thank you.0 -
Not quite! I got the FTP backup to work But I can't get S3 to validate its connection. However my hosting provider is experiencing a major incident. Some poor soul deleted the contents of every VPS within the datacentre!!! Hundreds of Servers. Tens of Thousands of websites are offline. So I now have two problems. A failed or failing HDD and a completely blank VPS. If you don't laugh you'll cry! 0 -
Feel free to reply back to this thread once your VPS is operating again, and we can proceed to troubleshoot the Amazon S3 validation issue (we will need the output from /usr/local/cpanel/logs/cpbackup_transporter.log when the validation fails). Thank you. 0 -
@cPanelMichael After 18 days my web hosting provider has finally fixed my webserver!!! Apparently some poor soul was trying to delete every VPS that was not in the Live Database, but forgot to include the "NOT" Over 1 million websites wiped out, including all of mine. My other issue was a fault on the disk. This morning my hosting provider ran a disk check and that's brought all my websites and emails back up. Anyway now it's back I'm very anxious to make an Amazon S3 backup asap. I have the output from /usr/local/cpanel/logs/cpbackup_transporter.log How should I send it to you? Does it contain sensitive information that's not for this public forum or is it OK to simply attach as a file? Best Regards 0 -
Hello, Please let us know if the following thread is related to the issue you have reported: Problems with config backup Amazon S3 Thank you. 0 -
@cPanelMichael Thanks for the link. I've read that thread. So the fix is to: Create a new Amazon account that's in a region (e.g. Ireland) that supports the V2 authorisation??? Unfortunately there is nothing I can do right now as my webserver is offline again!!! As soon as my hosting provider fixes it I will try your suggestion and will report back here. Thanks very much. 0 -
@cPanelMichael OMG my web server is back! After 23 days!!! OK do I need to create a completely new Amazon S3 account??? Because I created a new bucket in a new region of Ireland and the validation failed. See attachments. 37041 37051 Thanks in advance 0 -
Here's a quote from a user on the other thread that's relevant to this case: You can easily solve this by 1. Change the bucket location. 2 Create new amazon Access Key ID and Secret Access Key. If still the problem not solved, It is unique to your server so create a support ticket at cPanel.
Feel free to open a support ticket using the link in my signature so we can take a closer look if the issue persists. Thank you.0 -
Thanks @cPanelMichael I missed that crucial point sorry. I will change my keys and report back here. Cheers. 0 -
OK progress! I got the connection to validate: I followed the instructions on this page: Creating an IAM User in Your AWS Account - AWS Identity and Access Management For the benefit of others I had to do the following: Start here: 0 -
As there is no option in the cPanel Backup Config screen to force a backup.
Hello, You can force a backup generation via the command line if you ever want to test a backup generation manually:/usr/local/cpanel/bin/backup --force
Thank you.0 -
@cPanelMichael Thanks for the suggestion I will try it out now. Pity the GUI doesn't have a backup now button that would fire off that command. Cheers 0 -
Pity the GUI doesn't have a backup now button that would fire off that command.
This is a good idea for a feature request: Submit A Feature Request Also, I look forward to knowing if the backup generation is successful this time. Thanks!0 -
@cPanelMichael I tried to submit the feature request but the system won't let me post. I tried to login but it's saying my username or password are incorrect. (I triple checked) I can't register because I dont have an invite code. Looks like the automatic registration hasn't worked in my case. Cheers. 0 -
You can leave the invite code blank when registering an account. Thank you. 0 -
OK I had to recover my password, no biggie. :-) I have submitted a feature request. My topic is currently pending moderation. It's great to know we can make suggestions like that. 0 -
BINGO! My backup worked: So in conclusion there was nothing wrong with cPanel. The fault was all mine. Crucially I misunderstood that not only did I need to create an AWS user account, but that within AWS I also had to assign the user to a group and give the group a set of permissions(policy). Only then would the backup work. I feel so relieved that my websites are now safely backed up to a neutral location. @cPanelMichael Thank you very much for your help in resolving this. 0 -
So in conclusion there was nothing wrong with cPanel. The fault was all mine. Crucially I misunderstood that not only did I need to create an AWS user account, but that within AWS I also had to assign the user to a group and give the group a set of permissions(policy). Only then would the backup work. I feel so relieved that my websites are now safely backed up to a neutral location. @cPanelMichael Thank you very much for your help in resolving this.
I'm happy to see the issue is now resolved. Thank you for updating us with the outcome.0 -
@cPanelMichael Thank you for your time, help and patience. It's truly appreciated. 0
Please sign in to leave a comment.
Comments
27 comments