恢复 .bz2 Mysql 备份?
我尝试对此进行研究,找到了这个网站: http://www .lullabot.com/blog/importexport-large-mysql-databases 仍然很困惑为什么这不能像应有的那样工作。我正在尝试使用数据库将 mysql .bz2 备份从一台服务器恢复到另一台服务器。我运行的命令是:
bunzip2 SOB-MySQL-backup-summaries_live-2012-01-05.sql.bz2 | mysql -h 192.168.255.53 -u sobuser -p summaries_criticaltest
我在 2 个备份文件的文件夹中运行它:
-rw-r--r-- 1 root root 19339638 Jan 5 13:50 SOB-MySQL-backup-summaries_dev-2012-01-05.sql.bz2
-rw-r--r-- 1 root root 453 Jan 10 09:45 SOB-MySQL-backup-summaries_live-2012-01-05.sql.bz2
我得到的输出就是这样:bunzip2:输出文件 SOB-MySQL-backup-summaries_live-2012-01 -05.sql已经存在。
我不想转储任何内容,只是将备份 zip 恢复到数据库。我可能做错了,但任何帮助都会很好。谢谢!
I've tried doing my research on this, found this website: http://www.lullabot.com/blog/importexport-large-mysql-databases and still am confused as to why this isn't working like it should. I'm trying to restore a mysql .bz2 backup from one server to another with the database. The command I'm running to do so is:
bunzip2 SOB-MySQL-backup-summaries_live-2012-01-05.sql.bz2 | mysql -h 192.168.255.53 -u sobuser -p summaries_criticaltest
I'm running this in a folder of 2 backup files being:
-rw-r--r-- 1 root root 19339638 Jan 5 13:50 SOB-MySQL-backup-summaries_dev-2012-01-05.sql.bz2
-rw-r--r-- 1 root root 453 Jan 10 09:45 SOB-MySQL-backup-summaries_live-2012-01-05.sql.bz2
The output I'm getting is just this: bunzip2: Output file SOB-MySQL-backup-summaries_live-2012-01-05.sql already exists.
I'm not trying to dump anything, just restore the backup zip to the database. I may be doing this all wrong but any help would be good. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
第一个命令将 SOB-MySQL-backup-summaries_live-2012-01-05.sql.bz2 解压缩为 SOB-MySQL-backup-summaries_live-2012-01-05.sql - 显然这已经发生过一次。
来自
man Bunzip2
(在您的盒子里,或在线,例如 http:// /www.manpagez.com/man/1/bzip2/ ):因此,在
|
之前的部分中,您正在寻找以下内容:The first command will decompress SOB-MySQL-backup-summaries_live-2012-01-05.sql.bz2 to SOB-MySQL-backup-summaries_live-2012-01-05.sql - and apparently that already happened once.
From
man bunzip2
(at your box, or online e.g. at http://www.manpagez.com/man/1/bzip2/ ):So, in the part before the
|
, you're looking for this: