WordPress: Restoring Your Database From Backup:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
无编辑摘要
无编辑摘要
 
第11行: 第11行:
#登录到[[WordPress:phpMyAdmin|phpMyAdmin]]。
#登录到[[WordPress:phpMyAdmin|phpMyAdmin]]。
#点击数据库,并且选择你将要将你的数据导入的数据库。
#点击数据库,并且选择你将要将你的数据导入的数据库。
# You will then see either a list of tables already inside that database or a screen that says no tables exist. This depends on your setup.
#接着你会看到数据库中已经有一列表格或者看到一个界面显示不存在表格。这取决于你的设置。
#接着你会看到数据库中已经有一列表格或者看到一个界面显示不存在表格。这取决于你的设置。
# Across the top of the screen will be a row of tabs.  Click the '''Import''' tab.
#在界面的顶上方会有一组标签。点击'''导入'''标签。
#在界面的顶上方会有一组标签。点击'''导入'''标签。
# On the next screen will be a Location of Text File box, and next to that a button named '''Browse'''.
#在下一个界面中,会是一个文本文件框,旁边有一个按钮,按钮名为'''浏览'''。
#在下一个界面中,会是一个文本文件框,旁边有一个按钮,按钮名为'''浏览'''。
# Click '''Browse'''.  Locate the backup file stored on your computer.
#点击'''浏览'''。查找储存在你的电脑上的备份文件。
#点击'''浏览'''。查找储存在你的电脑上的备份文件。
# Make sure the '''SQL''' radio button is checked.
#确保选中了'''SQL'''单选按钮。
#确保选中了'''SQL'''单选按钮。
# Click the '''Go''' button.
#点击'''Go'''('''运行''')按钮。
#点击'''Go'''('''运行''')按钮。
Now grab a coffee. This bit takes a while.  Eventually you will see a success screen.


现在来喝一杯咖啡。这个过程花一些时间。最后你会看到一个成功的界面。
现在来喝一杯咖啡。这个过程花一些时间。最后你会看到一个成功的界面。
If you get an error message, your best bet is to post to the [http://wordpress.org/support/ WordPress support forums] to get help.


如果你得到了一个错误的信息,你最好的办法就是将错误信息发送到[http://wordpress.org/support/ WordPress 支持论坛]来寻求帮助。
如果你得到了一个错误的信息,你最好的办法就是将错误信息发送到[http://wordpress.org/support/ WordPress 支持论坛]来寻求帮助。
== Using Mysql Commands ==


== 使用Mysql 命令行 ==
== 使用Mysql 命令行 ==
The restore process consists of unarchiving your archived database dump, and importing it into your Mysql database.


重建过程包括取消你归档的数据库,并且将这个导入到你的Mysql数据库。
重建过程包括取消你归档的数据库,并且将这个导入到你的Mysql数据库。


Assuming your backup is a <tt>.bz2</tt> file, creating using instructions similar to those given for [[WordPress:Backing_Up_Your_Database#Using_Straight_MySql_Code|Backing up your database using Mysql commands]], the following steps will guide you through restoring your database :


加入你的文件备份是一个<tt>.bz2</tt>文件,创建这个文件的指示说明与[[WordPress:Backing_Up_Your_Database#Using_Straight_MySql_Code|使用 Mysql 命令行来备份你的数据库]]是相似的,下面的步骤会指导你重建你的数据库:
加入你的文件备份是一个<tt>.bz2</tt>文件,创建这个文件的指示说明与[[WordPress:Backing_Up_Your_Database#Using_Straight_MySql_Code|使用 Mysql 命令行来备份你的数据库]]是相似的,下面的步骤会指导你重建你的数据库:
1. Unzip your <tt>.bz2</tt> file:


1.解压你的<tt>.bz2</tt>文件:
1.解压你的<tt>.bz2</tt>文件:


<pre>user@linux:~/files/blog> bzip2 -d blog.bak.sql.bz2</pre>
<pre>user@linux:~/files/blog> bzip2 -d blog.bak.sql.bz2</pre>
<pre>user@linux:~/files/blog> bzip2 -d blog.bak.sql.bz2</pre>
'''Note:''' If your database backup was a <tt>.tar.gz</tt> called <tt>blog.bak.sql.tar.gz</tt> file, then, <tt>tar -zxvf blog.bak.sql.tar.gz</tt> is the command that should be used instead of the above.


'''注:'''如果你的数据库备份是一个<tt>.tar.gz</tt>称作<tt>blog.bak.sql.tar.gz</tt>文件,那么应该使用<tt>tar -zxvf blog.bak.sql.tar.gz</tt>命令行,而不是以上的命令行。
'''注:'''如果你的数据库备份是一个<tt>.tar.gz</tt>称作<tt>blog.bak.sql.tar.gz</tt>文件,那么应该使用<tt>tar -zxvf blog.bak.sql.tar.gz</tt>命令行,而不是以上的命令行。
2. Put the backed-up SQL back into MySQL:


2.将备份的SQL返回到MySQL:
2.将备份的SQL返回到MySQL:
第74行: 第39行:
<pre>user@linux:~/files/blog> mysql -h mysqlhostserver -u mysqlusername
<pre>user@linux:~/files/blog> mysql -h mysqlhostserver -u mysqlusername
  -p databasename < blog.bak.sql
  -p databasename < blog.bak.sql
<pre>user@linux:~/files/blog> mysql -h mysqlhostserver -u mysqlusername
-p databasename < blog.bak.sql
Enter password: (enter your mysql password)
user@linux~/files/blog:> </pre>


输入密码:(输入你的 mysql 密码)
输入密码:(输入你的 mysql 密码)
user@linux~/files/blog:> </pre>
user@linux~/files/blog:> </pre>

2008年6月14日 (六) 14:25的最新版本

使用 phpMyAdmin[ ]

phpMyAdmin是一个程序,用来通过一个网络界面远程地操作数据库。一个好的主机包包含有这个。关于备份你的WordPress数据库的信息,请看看备份你的数据库

使用运行在Unix上的phpMyAdmin,这里的信息得到了测试。

重建过程[ ]

可以在Podz的WordPress 重建指南找到phpMyAdmin2.5.3的一个视屏指南。

  1. 登录到phpMyAdmin
  2. 点击数据库,并且选择你将要将你的数据导入的数据库。
  3. 接着你会看到数据库中已经有一列表格或者看到一个界面显示不存在表格。这取决于你的设置。
  4. 在界面的顶上方会有一组标签。点击导入标签。
  5. 在下一个界面中,会是一个文本文件框,旁边有一个按钮,按钮名为浏览
  6. 点击浏览。查找储存在你的电脑上的备份文件。
  7. 确保选中了SQL单选按钮。
  8. 点击Go运行)按钮。

现在来喝一杯咖啡。这个过程花一些时间。最后你会看到一个成功的界面。

如果你得到了一个错误的信息,你最好的办法就是将错误信息发送到WordPress 支持论坛来寻求帮助。

使用Mysql 命令行[ ]

重建过程包括取消你归档的数据库,并且将这个导入到你的Mysql数据库。


加入你的文件备份是一个.bz2文件,创建这个文件的指示说明与使用 Mysql 命令行来备份你的数据库是相似的,下面的步骤会指导你重建你的数据库:

1.解压你的.bz2文件:

user@linux:~/files/blog> bzip2 -d blog.bak.sql.bz2

注:如果你的数据库备份是一个.tar.gz称作blog.bak.sql.tar.gz文件,那么应该使用tar -zxvf blog.bak.sql.tar.gz命令行,而不是以上的命令行。

2.将备份的SQL返回到MySQL:

user@linux:~/files/blog> mysql -h mysqlhostserver -u mysqlusername
 -p databasename < blog.bak.sql

输入密码:(输入你的 mysql 密码)
user@linux~/files/blog:>