Jump to content
thirty bees forum

Question

Posted

Hi,

I do have a VPS today with Cpanel and my host has daily backups. Unfortunately they have messed my site up and my backups aren't up to date and their backups seems to be corrupt which is catastrophic for me. 

I would like to have some really good advice of how to think about setting up good backup routines for the future. Not only for the e-commerce but also for the whole VPS (email, supportsystem, settings for webserver etc)

Thanks in advance

8 answers to this question

Recommended Posts

  • 1
Posted

Is the VPS Managed or Unmanaged?  Do you have access to the WHM side as root?

If you have root and whm set up an AWS backup.  Its super cheap and under your control.  You cannot yet restore directly from AWS automatically.  You will have a backup and you will be able to recover.  The cpanel backup is the entire account eg the site, the database, and the email.  Its not what we call Bare metal recovery eg the entire server.  If you are paying for managed services.  They may or may not have a backup.  If unmanaged no backup for sure.  Also most host don't include data recovery.  You are just paying for the VPS and that space and connection to the internet.  The data eg the Account is owned and maintained by you.  In other words you own your data not the host.  A lot of users mistakenly think they are paying for backup services.  If you have more question just hollar.

 

None of the links below are to bad on instructing you.   I gave you a few so you could hopefully piece it together.

http://foteezy.com/how-to-setup-amazon-s3-backup-option-for-whm/

https://storageswiss.com/2017/04/13/how-to-backup-a-cpanel-website-to-amazon-s3/

 

 

  • Like 1
  • 1
Posted
6 hours ago, Briljander said:

I earlier had backups sent to my GDrive but that was constantly giving api-errors so that's why I don't have it anymore, didnt have time to fix that errors all the time.

Core Updater can certainly help here. Doing an "update" to the current version should restore all core files.

Module files can get wiped and restored from the distribution package. Works for all modules Those few storing settings or images or whatever inside their module folder loose these settings. Settings in the database will be kept when replacing files, only.

  • 0
Posted

There are three important things about backups:

  1. They must be automatic.
  2. They must be regular.
  3. They must be stored away from the server you are backing up (offsite).

Personally I do this with a custom script that dumps the database, compresses it, and downloads it to my local servers. The local server is backed up with Crashplan so my backups are stored in 3 places: On the source server (not in the public_html folder!), on a server in my offices, and on Crashplan. The entire site is backed somewhat less often (weekly generally) as backing up a complete site with all photos tends to eat through bandwidth.

There are pre-made solutions that will do the same thing. Some of them back up to S3 as @Factor showed above. Others back up to Dropbox which can be a cheaper option if you are using Dropbox already.

All the above solutions can be used together with your web host's backup system for even better protection.

 

  • Like 1
  • 0
Posted

It's a managed server. They have managed to recover some from a 15 days old backup but the site is giving major errors but they are still working on it.

I earlier had backups sent to my GDrive but that was constantly giving api-errors so that's why I don't have it anymore, didnt have time to fix that errors all the time. Its crucial for me that it's something that works and dont need my attention.

Is this enough for backup? What if the backup is corrupt as in this case? Then no one can save me anyway? How do I test the backups?

If I only dump the database I guess all settings done in cpanel and for server will get lost or do you mean all that covers up with files being backed up?

 

 

  • 0
Posted
19 minutes ago, Briljander said:

What if the backup is corrupt as in this case? Then no one can save me anyway?

If your backups are corrupt you have a big issue to deal with. Generally the only options are to manually check & fix the data or to find an older backup that is not corrupt. Of course in the second case you will have a situation of missing any data that was added after the backup was taken.

 

23 minutes ago, Briljander said:

How do I test the backups?

It depends on what you want to test. If you want to test that whatever came out of the database was correctly transferred to your local server as a backup then you can test the zip file to make sure it is not corrupt.

However if you want to test that the backup is valid and that you can actually recover from the backup then the solution is to use the backup to do a test recovery and make sure you can rebuild a functioning server from your backup. You do these test recoveries onto a test or development system, not onto your live website.

 

26 minutes ago, Briljander said:

If I only dump the database I guess all settings done in cpanel and for server will get lost or do you mean all that covers up with files being backed up?

I don't use cpanel so I can't comment specifically on how to back that up. However if you are only targeting the database used by TB and backing up the TB files then whatever else is on the server (including cpanel settings) is not being backed up.

 

28 minutes ago, Briljander said:

I earlier had backups sent to my GDrive but that was constantly giving api-errors so that's why I don't have it anymore, didnt have time to fix that errors all the time.

I don't wish to be too harsh but your current problem quite likely exists because you didn't spend the time to fix the backup issues you were having. Never, ever ignore known issues with your backup system. It always seems to come back to bite you in the ass, often at the worst possible time.

  • 0
Posted

Thank you for you answers.

I have learned a lesson today and that is to never ever trust the hosting companies backups no matter what they say.

They have managed to restore almost everything now but from an 15 days old backup. A lot of orders missing we probably will have to add manually.

I guess I need the whole environment to be copied cause there are a lot of settings that would take to long to set up, not only the e-commerce site but also webserver config, other databases and also emails and user accounts.

Don't really know how I can test this backup though if it work, seems like it would require another server account.

 

  • 0
Posted
3 minutes ago, Briljander said:

I have learned a lesson today and that is to never ever trust the hosting companies backups no matter what they say.

This is a difficult conclusion to draw. I think the hosting company backup is a good first line of defense. Good hosts will do complete images of your VPS and store them on separate disks. They usually also allow you to download them so you can have your own offsite copy, or in some cases synchronize them to Amazon S2 or to Dropbox. These can be good ways to have an entire server image.

However it is also important that you have backups of each website on your server. The full server backup can require a full server restore and if you have only a few things that need to be fixed on a single website then restoring the entire server is generally overkill.

 

2 minutes ago, Briljander said:

 Don't really know how I can test this backup though if it work, seems like it would require another server account.

Yes. If you host somewhere like Digital Ocean or VULTR you can quickly & easily spin up a new instance to check your backups. You will only pay for the few hours of time you use for testing and then you can destroy the server and stop the billing. This is one of the advantages of this type of cloud hosting.

  • 0
Posted (edited)

My payment provider helped med and exported a csv with all lost orders. From there I could get products, sum of order, date and customer info.

From my TA-system I had information about orderreference which we attached to the shippinglabels. We could also see in there if the order was shipped or not. All this info was combined and with a lot of vlookup in excel.

The tricky part was to import the orders and to get the stock balance correct.

I used Prestashop Storemanager for this. Had to make two files, one that affected stock and one that didn't cause it wasn't possible to get minus stock on backorders which wasn't in physical stock. The latter part was fixed through sql. 

All purchase order and returns was added manually again afterwards but I think I have managed to restore all crucial parts now.

I have also expanded storage on GDrive and managed to get that part working. Will also buy a Synology server which I will put at home so I can have two remote backups.

The hosting company have told med I will get some kind of compensation for what they messed up (they autoterminated my account cause I had asked for a change in the account and was told I didn't need to pay until that guy was back from vacation). But I guess that compensation will never add up to the time I have put into fix this.

I don't have that possibility to spin up a new account. I guess it's not possible for me then to try the full WHM backup. I guess It's most crucial to try the sql-file and public_html file once in a while.

 

Edited by Briljander

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...