News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPBuilder.com:
Implementing Automatic Database Backup and Optimization in PHP
November 27, 2013 @ 10:52:31

On PHPBuilder.com today they have a new article posted sharing a few different methods you can use to do backups of your (MySQL) database and a few handy tricks/tools you can use to optimize it as well.

Every computer system has a backup. Nevertheless, the number of problems caused by a lack of a recent backup is huge. One of the reasons for that may be the fact that the backup process is not entirely automated. So, let's see how to automate the database backup process in PHP.

There's three recommendations for the (simple) database backup that can produce a file of the current database contents - mysqldump, mysqlhostcopy and a "SELECT INTO OUTFILE" statement. On the optimization size they suggest mysqlcheck, an OPTIMIZE query to help find trouble spots. There's a script included at the end showing how these methods can be combined into a simple PHP script, something that can easily be dropped into a cron job to perform every so often.

0 comments voice your opinion now!
automatic database backup optimization

Link: http://www.phpbuilder.com/articles/databases/mysql/implementing-automatic-database-backup-and-optimization-in-php.html

A
April 16, 2013 @ 10:57:01

On his site Lukasz Kujawa has posted a new tutorial showing you how to perform automated backups to Google Drive of files through their API (using his own library).

Where do you keep backups? I guess that depends on what do you backup. You might have a very clever answer for a business critical data but what about less important content? The best example would be a private blog. It will hurt if you lose your data but the odds are you're not willing to pay for any reliable storage. [...] There is one reliable storage, which is 100% free and almost everybody have access to it. Yes, I'm talking about Google Drive.

He walks you through the process of setting up your Google Drive account API access and where to find the data you'll need to make the connection. He then links over to his project that makes the backup a simple few lines of code (mostly configuration) of a backup path of your choice out to the remote Google Drive account.

0 comments voice your opinion now!
automated backup cp2google library google drive tutorial

Link: http://systemsarchitect.net/automated-backups-to-google-drive-with-php-api

Ilia Alshanetsky's Blog:
Google Docs Backup Script
June 22, 2010 @ 11:50:50

Ilia Alshanetsky has created a simple script (that uses curl) to make a backup of your Google Docs to keep you and your data a bit safer (since Google provides no backup capabilities).

As part of the backup strategy we also wanted to capture incremental versions of the documents (on a daily basis) in the event we needed to go back to the prior versions. To this affect I whipped up a small (120 lines) PHP script that will retrieve all your Google documents and save them to a local directory, in the event the document was created/updated in the last 24 hours, thus ensuring snapshot support.

His script exports each of the documents contained in the account and puts them on the local file system prefixed with a year/month/day value to keep things unique. You'll need curl and SimpleXML enabled to be able to use the script, but it's a pretty simple thing to drop in and run on most PHP5 installations.

Here's the code in raw text and syntax highlighted versions.

0 comments voice your opinion now!
googledocs google backup curl document


SitePoint Server-Side Essentials Blog:
Keep Your Blog Safe Back Up Your WordPress Installation
June 04, 2010 @ 09:25:04

In a new post from SitePoint's Server-Side Essentials blog today, Abbas Suterwala talks about something that could save you and your WordPress website in a pinch - a simple backup of everything.

No matter how much you trust your hosting company, disasters happen to everyone. You might also decide to change hosts, in which case you'll need to migrate your WordPress installation. In either case, you should have a full backup of your WordPress database and files from which you can easily restore, without losing any important data.

He shows two different ways to get the job done - one, doing a manual backup, is a bit more complicated than the other method, using plugins to help out - but they both end up with the same result. For each method there's detailed instructions and screenshots (as well as links to the two plugins they chose to use).

0 comments voice your opinion now!
wordpress tutorial backup plugin manual


Brian Swan's Blog:
BACKUP and RESTORE A Database with the SQL Server Driver for PHP
April 08, 2010 @ 12:48:08

In keeping with his SQL Server and PHP theme, Brian Swan has another new post talking about the combination, but this time he focuses on using the SQL Server driver for PHP to backup and restore a database with the BACKUP and RESTORE SQL Server commands.

The strategy you choose really depends on your application and your data. [...] Since I can't possibly cover everything between those extremes in one post, I'll aim for something in the middle. Like a blog, perhaps. In other words, I'll address the scenario in which I don't want to lose data, but I'm not willing to go to extremes to preserve it.

The post is largely SQL Server related - mostly for the BACKUP and RESTORE - but it gives you a good idea of how to make a full backup, take a snapshot of your logs and restoring that information back up just in case.

0 comments voice your opinion now!
sqlserver restore backup database tutorial


Zend Developer Zone:
Webinar - How Zend Used Adobe Flex & PHP to Build a Software Flight Recorder
February 03, 2010 @ 10:20:12

On the Zend Developer Zone there's a new post talking about a webinar Zend is hosting showing you how they created a "software flight recorder" with the combination of Adobe Flex and PHP.

Tasked with building a software flight recorder for Zend Server 5.0 (the new release of its popular PHP web application server), Zend chose Adobe Flex. Join this webinar by Adobe and Zend to learn what made The PHP Company opt for Flex, see a live demo, and hear lessons learned from one PHP/Flex development project. You'll find out how Flex and PHP can be used together to enhance your application.

You can catch it at one of two times (or both if you really want to, I suppose) - February 3rd at 6am PST or February 4th at 9am PST.

They're free to attend, so stop by and see what the Zend Server software has to offer that could save you and your developers a lot of time and hassle in the future.

0 comments voice your opinion now!
adobe flex zendserver flight recorder backup


Alex King's Blog:
WordPress Security, Upgrades and Backups
January 15, 2010 @ 12:53:06

In one of his recent posts Alex King looks at three things that most plague WordPress users in their day to day running of their sites - the security of their installation, upgrading when a new version comes out and making good backups of your information just in case.

I often get questions about WordPress security and how best to manage WordPress upgrades. These issues are closely related, and I've thought about them a good deal over the years (and I've been doing this long enough to have experimented with a variety of approaches). These are the approaches I am currently using and recommend for the technically savvy.

For each of the three topics (security, upgrades and backups) he talks a bit about the current situation of it in the WordPress world and offers up some helpful hints to guide you along a good path as well as links to a few services and tools that can help save you when you need that all important file from a backup.

0 comments voice your opinion now!
wordpress security upgrade backup


Sebastian Bergmann's Blog:
The Cost of Test Isolation - Follow-Up
January 20, 2009 @ 11:11:44

Adding on a bit more to a previous post of his look at test isolation (ex. global variables from one test do not effect any others') with an update he's made to the PHPUnit code concerning the isolation.

Since the previous posting, I have added a backup/restore mechanism for static attributes of classes to PHPUnit. This is yet another feature of PHPUnit that makes the testing of code that uses global state (which includes, but is not limited to, global and superglobal variables as well as static attributes of classes) easier.

Two graphs illustrate the difference - one showing a normal run and another with this new feature in use and showing off the performance increase it can give.

0 comments voice your opinion now!
test isolation phpunit xdebug backup restore static attribute


Sebastian Bergmann's Blog:
Global Variables and PHPUnit
June 17, 2008 @ 08:49:19

Sebastian Bergmann has a new post today about a feature of the PHPUnit unit testing tool that has the possibility of breaking when objects are introduced - backing up the globals.

It is hard to test code that uses singletons. The same is true for code that uses global variables. Typically, the code you want to test is coupled strongly with a global variable and you cannot control its creation. An additional problem is the fact that one test's change to a global variable might break another test.

You can disable the backup option if you'd like by setting the $backupGlobals option in your test to false. This lets PHPUnit know that you want to leave the globals (and superglobals) alone during the run.

0 comments voice your opinion now!
global variable phpunit unittest backup global superglobal test disable


Richard Heyes' Blog:
mail() replacement
December 10, 2007 @ 07:57:00

Richard Heyes has posted about a mail() replacement he's come up with that adds the additional functionality of backing up all of the data to a certain directory of your choosing.

A simple drop in replacement function for PHPs mail() function called mailb() which backs up all the data to a specified directory. [...] I've also added a simple header file to Apache and the download directory so it looks nicer.

You can download a copy of his library here as a .phps file (a quick and easy 40ish line script).

0 comments voice your opinion now!
mail email replace mailb backup data directory mail email replace mailb backup data directory



Community Events





Don't see your event here?
Let us know!


framework podcast community version conference tool laravel introduction release opinion composer interview library series artisanfiles voicesoftheelephpant security language list symfony

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework