Reserve copying of a site (part 2)

The copying method depends on a data structure of a site.

2?: the sites storing the data in files. Data files of such sites are allocated, as a rule, in one of subdirectories of the same directory where there is a site engine;

2b: the sites storing the data in a database. As a rule, the database is allocated separately from a site engine, more often on other computer.

For the sites storing the data in files, reserve copying of the data easier to produce to similarly copying of static sites, through FTP-connection. But, unlike static sites, the problem of support of integrity and consistency of the information in a backup copy here quits on the foreground.

Support of integrity of the data:

At creation of a backup copy of the data it is necessary to provide integrity and data consistency. What does it mean? As a rule, at adding / change of the data adjustment is imported at once to some files (or database tables). And now we will say, article adding on a site has coincided on time with backup procedure. It can quite turn out so that one of the files changed at adding of article, will register in a backup copy. As a result it can turn out so that, for example, the link to article in a backup copy will be present at a file, and article isn’t present. At recovery from such copy you will have the beaten link conducting on nonexistent page. Also it is an example from among the most harmless…

How to make that the backup copy contained the consistent data? The approach is uniform: it is necessary to provide, that the information has been fixed at the moment of the beginning of procedure of copying and in its course didn’t change, at least “from the point of view” the program producing backup. And here implementation of this approach very strongly depend from used a database and a site engine. Without going deep into particulars, I will give some examples.

In MySQL there is a utility mysqldump which also automatically provides a correctness of dump, but only for transactional tables (InnoDB). If your MySQL-basis is constructed on tables of type MyISAM (and the majority of Web applications use them) before starting the procedure of copying (or it is immediate at start mysqldump by means of appropriate keys, – lock-all-tables or – lock-tables) should be made explicit lock of tables, that is to forbid users something in them to write down.

The site engine should allow to the manager to pause “button click” operation of the scripts which are writing down the data in files and already after its stop copying can be produced.

Today the online technologies have become very popular. The Internet network is not only a place to entertain but also a space to earn money. In spite of the reason, to be presented in the Internet one needs a site. And this is when the question how to make a website arises. Those who are looking for info on how to build a website, are advised to refer to the Internet itself. There are lots of tutorials on how to make a website and related topics.

In any way, it wouldn’t be smart not to take advantage of this chance provided to us by digital technologies. Google and other search engines, social networks and forums, blogs – all of them could help to find info on “where to make a website” and similar topics.

Leave a Reply