Skip to content

Conversation

@elianddb
Copy link
Contributor

@elianddb elianddb commented Dec 4, 2025

Fixes #10136

  • Fix dolt_backup to work in non-Dolt directories; this amends the dolt.go boolean expression for commands that accept non-Dolt directories into a searchable map.
  • Remote sql-backup.bats from local-remote.bash so it also gets run against server.

@elianddb elianddb changed the title dolthub/dolt#10136: Fix dolt_backup to work in non-Dolt directories. dolthub/dolt#10136: Fix dolt_backup to work in non-Dolt directories Dec 4, 2025
@coffeegoddd
Copy link
Contributor

@elianddb DOLT

comparing_percentages
100.000000 to 100.000000
version result total
05faef8 ok 5937471
version total_tests
05faef8 5937471
correctness_percentage
100.0

@coffeegoddd
Copy link
Contributor

@elianddb DOLT

comparing_percentages
100.000000 to 100.000000
version result total
5a89970 ok 5937471
version total_tests
5a89970 5937471
correctness_percentage
100.0

@coffeegoddd
Copy link
Contributor

@elianddb DOLT

comparing_percentages
100.000000 to 100.000000
version result total
d04655e ok 5937471
version total_tests
d04655e 5937471
correctness_percentage
100.0

@coffeegoddd
Copy link
Contributor

@elianddb DOLT

comparing_percentages
100.000000 to 100.000000
version result total
298c4ee ok 5937471
version total_tests
298c4ee 5937471
correctness_percentage
100.0

@coffeegoddd
Copy link
Contributor

@elianddb DOLT

comparing_percentages
100.000000 to 100.000000
version result total
d9cd4ee ok 5937471
version total_tests
d9cd4ee 5937471
correctness_percentage
100.0

@elianddb elianddb marked this pull request as ready for review December 5, 2025 18:55
@elianddb elianddb requested a review from macneale4 December 5, 2025 18:55
Copy link
Contributor

@macneale4 macneale4 left a 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,
Copy link
Contributor

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.

Copy link
Contributor

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');"
Copy link
Contributor

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOLT_BACKUP Restore Requires Existing Database Context and Service Restart to Recognize New Database

4 participants