RSS
 

WordPress Backup to Dropbox 0.9 beta

10 Jul

I have finally got a version of the next release of WordPress Backup to Dropbox available for testing. This release adds the ability for users to exclude files from their backup, fixes some bugs and adds a some language translations.

New Features

The first thing you will notice after installing 0.9 is the exclude files or directories widget.

This widget will show every file within your WordPress directory giving you the ability to select what you wish to exclude from the backup. Checking a file will exclude it from the backup and checking a directory will exclude it and all its contents. A circle is displayed for a directory where at least one file or directory within it is to be included in the backup. In the example above the ‘cgi-bin’ directory and the ‘align-not.png’ file are to be excluded from the backup. The ‘wp-admin’ and ‘images’ directory are marked as partial because only one file is excluded within them.

Please Note: This widget is not available for Internet Explorer 7 or below. If you are one of the unfortunate souls that still use this deprecated browser please update!

Issues Fixed

In addition to this new widget I have fixed the following issues:

  • Issue #18 – Issues with the path separator for windows users
  • Issues with re-authorizing the plugin after access has been revoked from within Dropbox
  • Tweaked the backup monitor task timings in an attempt to fix backup resume spamming
  • Added a domain to i18n function calls for easier translation
  • Issue #25 – Error or conflict when activating WordPress Backup to Dropbox

 

New Languages

The plugin is now available in the following languages:

  • Arabic (ar)
  • Brazilian Portuguese (pt_BR)
  • Portuguese (pt_PT)
  • Galician Spanish (gl_ES)
  • Spanish (es_ES)

 

Known Issues

The only issue that I am aware of in this release is that when new files are added to you website they will show up in the exclude widget but their parent directory will not be correctly tagged as partially excluded. This will be fixed as soon as possible.

 

Get testing!

Thanks to every one for their fantastic support and feedback! Please download this testing release and let me know it you encounter any issues.

Click here to download WordPress Backup to Dropbox 0.9 beta 1.

 

Restoring previous versions of files in Dropbox

05 Jun

One of the most common questions I am asked now the WordPress Backup to Dropbox 0.8 has been released is, now that the zipping has been removed, can one still get an earlier version of a file that has been backed up? The answer to this question is, yes you can! Dropbox has this functionality built in and it is extremely easy to do.

Lets just say you botched a post and want to revert to a database a few days old. To do so go to the Dropbox web interface and navigate to the file that you wish to revert.

Once you have located the file all you need to do is click the little down arrow on the right hand side and select ‘Previous Versions’.

Note: You can also select ‘Previous Versions’ within the Dropbox folder on your computer by right clicking on the file and selecting this option in the Dropbox sub menu.

Once selected you will be presented Dropbox’s Previous versions page.

As you can see I dump my WordPress database every day so I can revert my SQL dump to any version within the last 30 days by selecting the day that I wish to revert to and clicking the restore button.

More information can be found in the Dropbox help page.

 
 

WordPress Backup to Dropbox 0.8

26 May

After many late nights I am pleased to finally release WordPress Backup to Dropbox 0.8!

In this release I have significantly changed the way backups are performed in order to make the process more efficient, smarter and use less memory and bandwidth. The biggest problems that people have been reporting is the plugin “Does not work” or “Starts but no backup is appearing in Dropbox”. Firstly, let me assure you, that I tested the original version on few WordPress installations and all seemed fine, unfortunately, my sample size was too small and others have run into problems.

I managed to identify three major issues that contributed to failing backups.

Issue 1: Memory

Zipping large files in PHP can be quite memory intensive and the method I originally used read an entire file into memory before compressing it and adding it to the archive. So if your website contained a file that was approximately 50% the size of your PHP memory limit setting then the process would raise a fatal error. In version 0.7.2 I added a quick hack that increases this limit via the ini_set() function. Unfortunately modifying this setting is blocked when PHP is running in safe mode or the Suhosin Patch has been applied. The former of which is very common on shared hosts around the world.

The same issue applies when uploading a file to Dropbox which is bad considering that a websites archive can easily be quite large!

In this new version I have removed zipping altogether in favor of a smarter differential backup algorithm. Each file will now be uploaded individually if does not exist in Dropbox, or has changed on your sever since the last backup.  Of course, this will mean that your initial backup will be larger then that of a zipped archive, however all subsequent backups will only contain files that have changed thus decreasing bandwidth.

In addition I have added a warning system where, instead of failing, the algorithm will log a warning if an upload of a file fails. Currently a warning is raised if it encounters a file that will exceed the memory limit setting in PHP, the upload times out or there is an error connecting to the Dropbox server.

Issue 2: Safe Mode

A backup can take a very long time to complete so the plugin needs to set PHP’s max execution time to unlimited to get the job done. If your server has PHP compiled with safe mode enabled then there is no way this can be set in code. For more information please read the blog post I wrote about this problem.

If you are in this situation the plugin will now warn you that you need to manually set you max execution time to a larger value and  attempt to backup your WordPress installation. If the backup duration nears this setting then the backup will fail alerting you to the fact that it is has been set too low.

Issue 3: Your Host

The third major issue I encountered is the fact that some hosts, including my own, kill long running processes. So regardless of the setting you have set above if the process takes longer then the host allows it will be killed. To get around this I have introduced cron job to the plugin that will monitor the backup process to ensure it is still running. If the monitor notices that no activity has occurred in five minutes then a new backup process will be started resuming from where the last one failed.

Conclusion

In addition to these major fixes I have added validation of the paths and fixed a couple smaller issues to increase the stability of the plugin.

I hope this version will work for all, however there is no such thing as bug free code! So if you have any issues, rather then just giving the plugin a low rating or tagging it as broken, please let me know and I will endeavor to fix them.

Issues can be raised in the BitBucket issue tracker or the WordPress forum for my plugin.