Using Our Two Scripts, You Can Easily Zip Your Whole FTP and Upload to Any OpenStack Swift Storage Like that From HP Helion Cloud Without Doing SSH. It is not possible to SSH at overtime from everyplace, but taking backup from everywhere, everyplace is important. Most importantly – both of these scripts written, frankly logical flow of work does the work. There are two set of scripts – (i) One is a WordPress Plugin (rather drop-in) developed by us and hosted on WordPress dot org (ii) Bash script to semi-automate the work from your GNU/Linux or OS X Desktop.
WordPress FTP Backup With FTP to Zip
We have a WordPress Plugin to take the full backup of the FTP server for the WordPress users who actually do not use a hosting that provides any command line interface – it is very simple, here is FTP to Zip. But it is dangerous to keep with default configuration for our good setups. The target audience of the plugin is different. Who never took backup and got hacked and lost the control of WordPress login, it is a great plugin for them to migrate. WordPress login is not required to use this plugin. If you use WP DB Backup Plugin with it, actually your database backup is also getting packed with it. It will remain at some place like :
1 | /path/to/public-FTP/wp-content/backup-random_number/ |
in sql format. You simply need to ensure that none can download that generated backup file with the default name myarchive.zip
via wget or browser. Here is the PHP file of that function which creates the file’s default name like myarchive.zip
:
---
http://plugins.svn.wordpress.org/ftp-to-zip/tags/1.8/backup.php
Secure FTP to Zip for Nginx
If we block the backup.php
, none can run the script via browser :
1 2 3 4 5 6 7 8 | location = /backup.php { allow 127.0.0.1; # allow domain.name; deny all; fastcgi_param SCRIPT_FILENAME /srv/www/mysite/public$fastcgi_script_name; fastcgi_pass 127.0.0.1:9000; include /etc/nginx/fastcgi_params; } |
If we block the myarchive.zip
, none can download it via browser :
1 2 3 4 5 | location = /myarchive.zip { allow 127.0.0.1; # allow your IP to allow download; deny all; } |
For the next steps, we will assume that WordPress is installed at /usr/share/nginx/html
and configuration file is /etc/nginx/sites-available/default
.
Upload WordPress FTP Backup to OpenStack Swift With FTP to Zip
Practically you can take the backup via browser (only your IP or domain can after the right setup) after a slight work. No SSH work. If you use WP DB Backup Plugin, set its regular scheduled backups. All is packaged inside myarchive.zip
.
Now, read this guide – Python Script to Upload Files to OpenStack Swift. Does it needs explanation? You’ll download the backup on your backup on GNU/Linux or OS X Desktop and run the script from there.
If you do like the noobs, you’ll get hacked but basically lesser the number of lines of a script; it becomes logically easier to detect any issue, sucks lesser RAM etc. If we combined WP DB Backup Plugin with a new name with these two scripts and tell you as if all is ours, you might face difficulty with WP DB Backup Plugin. Frankly, running one line command tar -cvzf backup.tar.gz /path/to/foo/
creates a backup and running swift upload this that
uploads it. If you run as cronjob, the things will get automated, but change of never detecting the errors becomes very high. Users take backup, but most backup sadly fails.
Actually, taking a XML based backup of WordPress is very useful.
Tagged With http://swift-backup-02/wordpress/