转储数据库并以新名称重新导入 [英] Dump database and re-import under a new name

查看:107
本文介绍了转储数据库并以新名称重新导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果需要使用MySQL将数据库"foo"的内容复制到第二个数据库"bar"中,通常会执行以下操作:

If I need to duplicate the contents of a database "foo" into a second database "bar" with MySQL, I would usually do something like this:

mysqldump -u root foo > foo.sql
mysql -u root -e "CREATE DATABASE bar;"
mysql -u root bar < foo.sql

与ArangoDB等效的过程是什么?

What would be the equivalent procedure with ArangoDB?

推荐答案

尝试使用 arangodump arangorestore 工具,例如:

Try to use arangodump and arangorestore tools, for example:

arangodump --server.database myDatabase1 --output-directory "myDumpFolder"
arangorestore --server.database myDatabase2 --input-directory "myDumpFolder"

这篇关于转储数据库并以新名称重新导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆