3

Get WordPress and a host ready. Install it, add plugins. Customize at your will. That will give us many files and a database.

We are already keeping every file on any given Version Control System (actually GIT SVN).

So, what's the best way to keep that "backup" fully and easily recoverable?

I believe that "best way" would be a simple and/or automated way (unlike this) to backup and recover the database with just one click.

2 Answers 2

3

To backup, use tar & mysqldump commands. These are Open standards, so accepted everywhere & having no bug.
Backup files with tar command:

$ tar -cvzf /path/to/storage/backup.tar /path/to/wordpress/installation 

To restore files, simply untar it. An example:

$ tar -C /path/to/wordpress/installation -xvzf /path/to/storage/backup.tar 

Backup database with MySQLdump command:

$ mysqldump --opt -u [uname] -p[password] [dbname] > [backupfile.sql] 

To restore database, simply execute sql dump file by mysql command. An example:

$ mysql -u [uname] -p[password] [db_to_restore] < [backupfile.sql] 

Make sure there's no space between -p & password. It will work no matter how large your database is (phpMyAdmin can't be used to backup & restore large databases). MySQLdump is somewhat slower than other raw methods, but its bug-free & effective.

To do automation, use these commands as cron jobs' command.

Sign up to request clarification or add additional context in comments.

Comments

0

Try Wordpress plugin XCloner Backup and Restore. It might help you beyond SVN. Setup a cron job for automation...

2 Comments

I have actually already tried it and it ain't that easy to setup as I initially thought. I could get to backup only the database but restoring it is harsh.
Check out my another answer. As per your requirement just change the parameters.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.