Back up your site. Why is this a must?

    • 119 posts
    November 29, 2017 9:54 AM EST

    The best strategy for backups (PHP and MySQL) is; backup your files and database daily and store it in at least 3 places.

     

    1. Inform your customers daily at what time you do the backup, this can be done with an announcement which shows up on the main activity feed for all member levels.

    EG: The site will be backed up at 00:00 and will not be accessible for 1 hour.

    2. To start the backup procedure;

    Set your website into "maintenance mode", in admin panel -> Settings -> General settings and tick the option button "Offline (Maintenance Mode)" also set your "maintenance code" and click "safe settings".

    3. Start the backing up process

    4. After backing up your site and data, set your website back into online mode; In admin panel -> Settings -> General settings and tick the option button "Online" and click "safe settings".

     

    Total backups needed:

    Daily backups 1 - 7 ( keep deleting the oldest)

    Weekly backups 1 - 4 (on a saturday do two backups a daily and a weekly  (same backup but called different) delete the oldest of 4

    Monthly backups 1 - 12 (on the last day of the month and rotate on a 12 month basis, delete the oldest of 12.

    Yearly backups 1 - xxxxxx as long as the company does exists. Extra backup on the last day of the year and never delete this one.

     

    Storage of the backups in 3 locations:

    1. One backup copy on the server in a password protected directory

    /DailyBackups

    /WeeklyBackups

    /MonthlyBackups

    /YearlyBackups

    2. One backup copy on your personal computer with a backup copy to the external hard drive

    3. One backup copy on a cloud service

    You can delete the files after downloading to save online storage or you can leave one, the latest backup, as it is easier to copy/move files online to restore:

    Weekly backups are off site, one on personal pc and one on external hard drive and one in the fireproof safe

     Monthly backups are off site, one on personal pc and one on external hard drive and one in the fireproof safe

    Yearly backups are off site and stored in a fireproof safe

     

    Folders you can exclude:

    To save on storage for your backups you can exclude the following directory:

    /public_html/temporary/cache

     

    Cron jobs

    It is easy to set up using cron jobs daily, weekly, yearly width the command "zip/tar public_html *.*" and "mysqldump" into a folder like:

    /DailyBackups

    /WeeklyBackups

    /Monthly

    /YearlyBackups

    Two backups per day are made one for the directories/files and one for the database itself and stored in the above directories with a cron job.

    Cron jobs explained and samples: Here is a link to a site to create cron jobs.

     

    Routine:

    Make a routine to download the backups daily.

     

    Testing your backups:

    Test your backups at random (PHP and MySQL) by installing it on a network server and check the site. If you do, make sure you enter the right login, password and connection string in database.php and delete the cache.php and rename the cache.sample.php to cache.php. The cashing has the be set right "To File" to get the site working. Then you can test the site.

     

    Last note:

    • Keep the backups, if in an office, offsite. Also upload to a free or paid Cloud Service.

    • Never store all backups in the same location!

     

     

    wink A little more to read below why you should make a backup and what an IT Disaster Recovery plan is;

     

    IT Disaster Recovery Plan not only for Offices but also for Online Businesses:

     

    What is an IT Disaster Recovery Plan?

    An IT disaster recovery plan is a process put in place for responding to unforeseen events affecting your data with a documented and structured approach and a clear set of instructions. These instructions include a step-by-step plan designed to greatly minimize the impact of any disaster and to allow your business to swiftly resume operations.

    The broader terms business continuity or disaster recovery, generally  describe a similar concept. They are procedures allowing you to recover from a disaster quickly so you can continue your business with minimal disruption. However, the IT disaster recovery plan refers specifically to data and other IT operations.

    The other two descriptions may also apply to procedures providing for things like replacement for damaged equipment or inventory and even additional part-time or full-time help where needed.

    It begins by analyzing the business process and the continuity needs of the company. It requires a business impact analysis and risk analysis to establish the recovery time objective and recovery point objective — both important when setting up the plan.

     

    Analysis

    A thorough analysis of the existing digital setup is needed, including hardware, software, data, connectivity, network and more. This, of course, will depend on your business and the industry you happen to be in. The analysis should disclose the resources needed to allow the recovery of business functions and a time objective to recover those functions, as well as recovery point objective after a disaster.

    The analysis will also include establishing a disaster-recovery team of employees. These should be employees with the most experience so they can be assigned with contact details and specific tasks. These individuals should be able to prioritize critical business functions and determine the speed of recovery.

    Have methods of communication in the event cell towers and internet connections are down. Create a top down list so everyone can go through it until one is found that is working and connects the recovery team.

    The next step involves designating a disaster recovery location where critical backup systems can be accessed allowing employees to work. For many small businesses this might be your home, hotel or the home of another business partner.

    Have multiple means — phone, email, VOIP, etc. — for contacting everyone involved in the recovery process as well as for other employees, customers, vendors, suppliers, business partners, your insurance company and other resources that might be relevant for your particular business.

    Make your customers aware of your emergency plan with alternative ways of getting in touch with you, placing orders, sending payments and even a backup business location. Your website is a great place to have this information.

    Back up your digital information in more than one location.

    Test your plan at least once a year to integrate new procedures and technologies and to eliminate those that are inefficient or no longer necessary for your business.

     

    Who Should Implement an IT Disaster Recovery Plan?

    The answer is every business, but not every business has the resources to implement such a plan with all the bells and whistles. So just having a plan and testing to see that it works no matter how small your business already puts you ahead.

    However, for industries that totally rely on digital technology for their day to day operations, it is a must. And it should be as thorough as possible within the limits of your budget. Independent insurance agents, game designers, IT service providers, telecommunications companies and others come to mind as all in need of such a recovery plan. But in reality, it applies to every business that is using computers in their operations.

    As far as the reason for implementing an IT disaster recovery plan, it is the same as the reason for buying insurance for your car or home. Having it will give you the peace of mind that you will be able to recover much quicker, not if, but when a disaster eventually strikes.

    If the process sounds complicated and you don’t want to implement it yourself, you can have managed business continuity service providers do it for you. The price and services vary greatly, so shop around and choose a company that is able to address the particular requirements of your business.

    Conclusion

    Businesses, no matter how small or large are now more vulnerable than ever when it comes to cyber attacks. But disasters can also come from human error or nature, and in any event you need systems to deal with those situations and manage them effectively to minimize the negative impact. An IT disaster recovery plan will let you prevent if possible, or at least anticipate and mitigate any business interruptions to your business when a problem occurs.


    This post was edited by Maurits at November 29, 2017 10:42 AM EST
    • Moderator
    • 6923 posts
    November 29, 2017 10:26 AM EST

    Great tips! Thank you for posting. cool

    • 119 posts
    November 29, 2017 10:48 AM EST

    If anything needs adding, let me know and I will update the post cool

    • 154 posts
    November 29, 2017 11:19 AM EST

    awesome post

    • 25 posts
    April 3, 2018 9:06 PM EDT

    So we have to take the site down to do backups? Yikes! Suppose of users online you cant just kick em off?

     

    Peter Gruessing

    • Moderator
    • 6923 posts
    April 4, 2018 4:57 AM EDT

    It's actually best practice to set the site off when doing backups in order to ensure you don't get corrupt backups. I know of a HUGE roleplay site that does this. They have an announcement that the site goes offline daily at something like 2am for a bit to do the backup. 

    • 25 posts
    April 4, 2018 11:56 AM EDT

    Hmm, I wonder how a site like Facebook handles this without going offline? So we have to do a mysqldump from phpmyadmin and then a storage dump at the same time to get all of it?

    • Moderator
    • 6923 posts
    April 4, 2018 12:20 PM EDT
    Galify.com said:

    Hmm, I wonder how a site like Facebook handles this without going offline? So we have to do a mysqldump from phpmyadmin and then a storage dump at the same time to get all of it?

    Facebook has redundant servers so no downtime. Most huge sites don't do backups as we would think of them. They have redundant multiple servers in case of hardware failure. 

    Doing backups does stress the server some. You can do your backups with the site online but you can get corrupt backups due to users saving data at the same time it's being backed up and other reasons. 

    • 25 posts
    April 4, 2018 12:43 PM EDT

    Could we have another server take over for the main one while one was down so the site does not go offline? We are going to  try and use Nextcloud on a freeNAS server using ZFS. The advantage of this is ZFS allows you to take snapshots while its online.  Your thoughts? If we can get this working correctly we could share this information with your other users so they could deploy  it as well.

    • Moderator
    • 6923 posts
    April 4, 2018 12:48 PM EDT
    Galify.com said:

    Could we have another server take over for the main one while one was down so the site does not go offline? We are going to  try and use Nextcloud on a freeNAS server using ZFS. The advantage of this is ZFS allows you to take snapshots while its online.  Your thoughts? If we can get this working correctly we could share this information with your other users so they could deploy  it as well.

    If it takes snapshots while it's online, check with the host regarding backups as it sounds like it'll work ok.