ZNet India Blog ZNet India Company Official Blog

22Mar/100

MySQL Backup and Recovery Issues

There can be numerous ways your MySQL in database server can get corrupted despite the best of software and proficient users. Nevertheless MySQL recovery is not a complicated procedure especially in the presence of reliable backups.

InnoDB, the leading storage engine for MySQL has an automatic built-in recovery system that for large part operates very seamlessly. Whenever the database hosting goes down, InnoDB takes charge and tries to fix issue by running the log file from its last timestamp. In nine out of ten cases it actually succeeds. The not uncommon situations like and operating system crash or power failure provide instances where InnoDB itself takes care of tedious data recovery. However in the eventuality of InnoDB failing in providing automatic repair solution, the overall database will not start.

No less significant is the fact that regular backups of your database should be scheduled. Quite helpful is mysqldump utility for making backups of data as a snapshot in any available point of time. In order to create a “dump file” of MySQL database you can use the following command:

shell> mysqldump --single-transaction --flush-logs --master data=2 \
--all-databases > dump.sql

The output file can be named in any manner – in the above case it is named dump.sql. This dump.sql file consists of the tables, data, structures of all databases entirely backed up into an SQL text file, dump.sql.

In the above command “–single-transaction” option is particularly for InnoDB tables. This option carries out an online backup that allows no locks on tables.
Further to incremental changes have to be saved if you wish to make incremental backups, This process is best achieved by employing binary logs. It is advisable to start MySQL always with the –log-bin option to enable that binary log. In the mysqldump command referenced above there is a “–flush-logs” option which allows the server to flush out its logs. These logs can be scheduled to be flushed incrementally between dump backups to hold entire data changes made since the time of backup.

Let’s suppose you have a case where your database experiences a terrible crash. It is simple to restore If you have regular backups along with binary logs, restoring is not actually difficult. To begin with take restore to the last full backup which you have using the following command:

shell> mysql < dump.sql

This makes for restoration of data to the point it was at your last mysqldump backup. In order to restore various changes arisen since then, employ incremental backups from the binary log files that are clearly listed in the data directory of MySQL server (in our present example, logfilename-bin.000001 and logfilename-bin.000002).
shell> mysqlbinlog logfilename-bin.000001 logfilename-bin.000002 | mysql

12Feb/090

Recent Case Study with Microsoft

Please check our recent case study with Microsoft:

ZNet India Standardizes Messaging Infrastructure, Enhances Services:
http://www.microsoft.com/india/CustomerEvidence/details.aspx?casestudyid=558&type=V

Indian Hosting Company Offers Fully Loaded Dedicated Hosting and Hyper-V Based Virtual Private Servers to Customers: http://www.microsoft.com/india/CustomerEvidence/details.aspx?casestudyid=557&type=C

6Jan/090

Learn why you must opt for Windows 2008 hosting

Web hosting is essential to conduct any type of business over the internet. Making the right decision in this regard is the key to successful business but some points can always help to choose the right web hosting services.

Here, it is essential to first understand what Windows based web hosting is all about. Windows based web hosting, in simple words, is the type where web server has a Windows based operating system. Benefits of using Windows server are manifold which gets enhanced by using Windows 2008 hosting because the server infrastructure becomes more reliable. Some other basic benefits are mentioned below.

  • One good advantage is available in the form of .net framework which is arguably the best product by Microsoft after Windows.
  • Using ASP and ASP.NET is much easier with Windows 2008 hosting.
  • Windows 2008 hosting allows you to make use of different programming scripting languages. What it means is that along with using ASP and ASP.NET, you can also make use of PHP, Perl, Python and the rich .net framework.
  • Windows 2008 hosting helps you to use MySQL and Microsoft SQL on the same computer which allows you to host different sites created in different environment.
  • Security of Windows server 2008 is also impressive. Because of the availability of Network Access Protection, Read-Only Domain Controller and Federated Rights Management you get such security shield which is just unprecedented.

Benefits of Windows 2008 hosting are many but these benefits basically depends on making the right decision pertaining to a hosting company. While buying a hosting plan, confirming the availability of some features is a good idea. These features include Microsoft IIS Manager Access, Trust Level Control, Windows Communication Foundation, Windows CardSpace and software like DOTNETNUKE, ASP POLL, NGALLERY, U GUESTBOOK, WORDPRESS, etc.