我通过运行以下cronjob进行每日备份:
mysqldump --user root --password=xxxx databasename > /home/ec2-user/backup/databasebackup_$today
我将如何简单地从备份中还原,完全覆盖可能存在的任何内容?
答案 0 :(得分:0)
您尝试过...
mysql --user=root --password=xxxx --database=databasename < /home/ec2-user/backup/databasebackup_$today
希望有帮助
答案 1 :(得分:0)
另一种方式
object2 = {property: some_value, color_property: yellow, id: 1},
{property: some_value, color_property: green, id: 2},
{property: some_value, color_property: green, id: 2},
{property: some_value, color_property: red, id: 3},
{property: some_value, color_property: yellow, id: 1}
将提示您输入密码。假设您不打算执行cron还原过程。