How to Restore Website to Old Backup

0 43

In this write up we would be looking at ways and how to restore your website to old backup if your website crashes or your websites is being hacked by hackers. Restoring back your websites to old backup will help you recover back your saved information and prevent loss of files and data.

How to Restore Your Website to a Previous Backup

As you know the common website around is WordPress so for the purpose of this study we would be looking at how to restore WordPress backup and this can be done in the following ways:

You can use plugins tools like Updraftplus to do your backup and this can be done by simply following the procedure on how to restore your website to a previous WordPress backup here: How to Restore You Website Using Updraft Plus

- Advertisement -

You can use tools like CGI and python scripts like web-restore.py script, you can download this tool from the following link: https://github.com/jdaly/web-restore.py

This is another alternative method you could use in restoring back your websites to old version and this will be shown in the next section below!

How to Perform WordPress Restore Backup Using CGI Scripts Python

Before you can start on using this restore tool, you need a fresh copy of WordPress installed as well as install LAMP stack first before proceeding with the installation of this software as without installing it, you won’t be able to execute the program.

When you have installed all the requirements for this restore tools run and complete the following steps:

Step 1: Copy web-restore.py file from where ever you moved it and paste in your website root folder eg wp-content/uploads/web-restore (or where ever that file is located)

- Advertisement -

Step 2: Open a command prompt window and navigate to the directory where python is installed. [if using windows, in Start Menu find Program Files then look for Python subfolder] cd “Program Files” (or wherever your python install directory is). Type: python web-restore.py –help. This will show what options are available when running the program.

Step 3: Give the path to your backup file: python web-restore.py /path/to/your/backup/*_tables.sql. This will restore tables from the backup that you provide, it will create a new database named sitebkp (if it does not already exist), and then restore each table in turn. How?  By running the sql commands in batches of 100 records at a time, to make sure everything loads quickly on big databases.

--advertisement--

Step 4 : A pop up window would come up showing how many rows has been restored out of total number of rows How do I know this has worked?  Check phpMyAdmin or whatever tool you use for mysql administration and have a look, you should see your tables How do I use it to restore an individual table?  Just provide the path to that table: How do I tell it what WordPress database to use?  If none is specified with –dbname then the first one in the list will be used (usually wp_blogs)

How do I know this has worked?   Check http://mysite.com/wp-admin and login How can I restore a single row from OldTableName?

The sql script generated by web-restore.py comes with this feature How can I tell how many rows have been restored so far?  Check <a href=”http://mysite.com/wp-admin/”>http://mysite.com/wp-admin</a> How do I know this has worked?   Check <a href=”http://mysite.com/wp-admin/”>http://mysite.com/wp-admin</a> How can I restore tables that include WordPress meta:

You can use the –blogs option How do I stop it after x hours?  Use –end How do I prevent mysql from timing out and aborting the restore?  Use –kill How much is this going to cost me, in terms of my server’s memory and cpu usage?

If you give web-restore.py a high timeout value with the –timeout option (default is 300 seconds), you can use it on very large databases

How do I bring the database online?  Use –online How much is this going to cost me in terms of disk space?

Estimated: about 1 Mb How does web-restore.py work, and what does it actually do with my data?   How hard would it be for me to adapt web-restore.py to restore from a mysql backup file (instead of restoring directly from an SQLite3 backup)?  Very easy How fast will its performance be relative to direct restoration from SQLite3 files?

About 50% slower or more How many rows will there be in a typical WordPress blog’s wp_users table?   How many rows will there be in a typical WordPress blog’s wp_usermeta table?  How many rows will there be in a typical WordPress blog’s wp_postmeta table? How many rows are there in the biggest tables of my site, out of 1 million total rows?

How long will it take to restore one row from my user data table (which is 17Mb)? How can I use web-restore.py for incremental backups, i.e. how do I keep track of which users or posts have been already restored How can I restore multiple sites with web-restore.py How hard would it be to use web-restore.py to create lower-level backup files How fast is a direct backup from SQLite How can I use web-restore.py to restore a database built using How hard would it be to add incremental backup capability How fast is a direct restoration from SQLite How much disk space will this save How much zip compression can I get with web-restore.py

11. What’s the performance of SQLite3 versus MySQL (and maybe Oracle) How does web-restore compare to phpMyAdmin.

How easy is it for me to make my website recoverable by myself when there is no hosting company support How often should I take backups What if someone else has restored my site, and they have deleted one of my tables How can I restore a site that has been hacked How do I keep my backup from filling up How can web-restore.py help me recover from hacking How much disk space will this save How hard would it be to add incremental backup capability How fast is a direct restoration from sqlite How much zip compression can I get with web-restore.py

Because most of us might not be a tech person let’s stop here for now so you don’t get confused, follow the process well by reading this write up over and over again until you get the process and steps to take, help share this write up with your social media network.

--advertisement--

Leave A Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.