-
-
Notifications
You must be signed in to change notification settings - Fork 593
dolthub/dolt#10136: Fix dolt_backup to work in non-Dolt directories
#10164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
dolt_backup to work in non-Dolt directories.dolt_backup to work in non-Dolt directories
macneale4
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks good from the perspective of testing and the features behavior.
I think you may want to ship this as it's own change. As discussed in DM, the abstractions for determining when it's ok to not have a physical dolt database as a file accessible entity are busted. Fixing that would be greatly appreciated.
| "init": true, | ||
| "sql": true, | ||
| "sql-server": true, | ||
| "sql-client": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sql-client isn't a thing anymore. that's dead code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More generally, I think we to leave this set as is. the backup restore case is not special enough to be added to this list. I don't see clone here. Why not? This list and it's contents seems. Going to DM you about this.
| dolt sql -q "call dolt_backup('add', 'backups', 'file://$backupsDir');" | ||
| dolt sql -q "call dolt_backup('sync', 'backups');" | ||
| # We could cd into db1 but Windows does not like us touching its CWD when we drop the database when restoring. | ||
| dolt sql -q "use db1; create table t1 (pk int primary key); insert into t1 values (42); call dolt_commit('-Am', 'creating table t1');" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worth noting you can: dolt --use-db db1 sql -q "create table..."
That's more characters I guess :)
Fixes #10136
dolt_backupto work in non-Dolt directories; this amends thedolt.goboolean expression for commands that accept non-Dolt directories into a searchable map.sql-backup.batsfromlocal-remote.bashso it also gets run against server.