Showing posts with label backups. Show all posts
Showing posts with label backups. Show all posts

Friday, April 25, 2008

How to backup WordPress data

Backup is a process of duplicating data, so that it could be used to restore the original after a data loss event. This tutorial will show how to backup your WordPress posts, pages, comments, custom fields, categories, and tags easily, using WordPress eXtended RSS (WXR).

To backup:

Step 1: Login to your WordPress Control Panel.
Step 2: Click on Manage.
Step 3: Click on Export
Step 4: Click on "Download Export File" button.



You will download the WXR file, for example "wordpress.2008-04-24.xml". 2008-04-24 is the date of the WXR file downloading.

To restore:


Step 1: Login to your WordPress Control Panel.
Step 2: Click on Manage.
Step 3: Click on import.
Step 4: Scroll down to the end of the Import list.
Step 5: Click on Wordpress.
Step 6: Click on the Browse button, and choose the WXR file.
Step 7: Specify the author. Click on "Download and import file attachments", if necessary.
Step 8: Click on the Submit button.

note: The maximum WXR size that can be imported, may vary, depends on the PHP settings.

Wednesday, April 16, 2008

Backup folders with 7-zip command line

The 7-zip command line can be used to do a multiple folders backup. The good thing with 7-zip is that it support many compression method such as bzip2, gzip, zip and of course 7z.

Here are steps for doing a backup on multiple folders on Windows:
  1. Download the 7-zip Command Line Version from http://www.7-zip.org/download.html.

  2. Extract the content of the zip file to a temporary folder.

  3. Copy 7za.exe to your system folder (for example C:\Windows\System32 for Windows XP).

  4. Create a folder for your backup, for example C:\backup.

  5. Create a text file in the C:\backup folder and name it backup.txt.

  6. List the full path of the folders that will be backup, each on a new line.

  7. Create a batch file in C:\backup folder and name it backup.bat.

  8. In the backup.bat file, type
    7za u backup -up1q3r2x1y2z1w2 @backup.txt

To back up, just double click the backup.bat file. A command prompt will be opened and closed automatically when the backup process end.

As a result, you will get a backup file named backup.7z. The u command will instruct 7-zip to update the content of the backup.7z file or create a new one if backup.7z does not exist.

If you don't like the 7z compression method and would like to use the zip compression method instead, just add -tzip switch after the u command.
7za u -tzip backup @backup.txt

Now, the backup file that will be created is backup.zip.

To automatically run a backup at a specific time, please use the Scheduled Tasks feature for Windows XP.