Hi This is not strictly speaking php problem but its closer I can find. We have a very large database of items. We also have a php program that checks our database to find out number of items in stuck, in case of customer enquiry. During the night we backup the server, which might take hours. We are supposed to close all running applications during back up. My question is: what's the best way of providing this 'items in stock' enquiry while the back up is running? In other words, how can we check the server stock level while server is being backed up? thanks for taking the time to read my problem.
Several options spring to mind and they depend on your infrastructure set up. If you mirror the disk, or setup database replication then you can run your backup on the mirrored copy or replicant database and therefore don't need to take the production one off line at all. You also protect yourself better in that if it is taking you hours to backup, it's going to take even longer to restore which means you're out of action for quite a long time in a disaster recovery situation. With a mirror or replicant, you can switch over and get operational again in minutes. Even with very large databases, MySql (assume you're using that) doesn't take long to back up, so how are you doing it? Consider backing up at a file system level rather than through the database? Consider vlan cloud hosting - that way backup is handled by your host at a SAN level and you don't need to worry about pro-active backing up (have a look at http://www.flexiscale.com for details). Run parallel copies of the stock level table (so just replicate the table rather than the entire database) and again, back one copy up whilst the other copy is in use.
Hi Many thanks for your reply. The reason I was a bit vague about the set up is that we do not deal with the back up of the data. Just to make matters abit clearer: The database is a version of MYSQL running on office server. This server just stores office entered data. None of these data is online. The programme is setup so when I request a part number, the server checks it and given me a quantity back. In the evening we have to shut all other programmes to enable the back up to take place, which leaves our customers at weekend and in the evening without a stock availability check facility. Cheers
You need a better way to process these backups. There are a lot of ways that would enable you to do this without having to "shut all other programmes".