Skip to content

Commit 31d2aac

Browse files
rename from upload to restore
1 parent 6cb0c67 commit 31d2aac

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

internal/tiger/cmd/db.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ func buildDbCreateCmd() *cobra.Command {
737737
return cmd
738738
}
739739

740-
func buildDbUploadCmd() *cobra.Command {
740+
func buildDbRestoreCmd() *cobra.Command {
741741
var (
742742
database string
743743
role string
@@ -757,9 +757,9 @@ func buildDbUploadCmd() *cobra.Command {
757757
)
758758

759759
cmd := &cobra.Command{
760-
Use: "upload <file-path> [service-id]",
761-
Short: "Upload and restore database dumps",
762-
Long: `Upload and restore PostgreSQL dumps to a database service.
760+
Use: "restore <file-path> [service-id]",
761+
Short: "Restore database from dump file",
762+
Long: `Restore a PostgreSQL database from a dump file to a database service.
763763
764764
The service ID can be provided as an argument or will use the default service
765765
from your configuration.
@@ -779,26 +779,26 @@ Cloud-Friendly Defaults:
779779
- Performs preflight checks before starting restore
780780
781781
Examples:
782-
# Upload plain SQL dump to default service
783-
tiger db upload backup.sql
782+
# Restore plain SQL dump to default service
783+
tiger db restore backup.sql
784784
785-
# Upload to specific service
786-
tiger db upload backup.sql svc-12345
785+
# Restore to specific service
786+
tiger db restore backup.sql svc-12345
787787
788-
# Upload custom format dump with 4 parallel jobs (faster)
789-
tiger db upload backup.dump --jobs 4
788+
# Restore custom format dump with 4 parallel jobs (faster)
789+
tiger db restore backup.dump --jobs 4
790790
791791
# Read from stdin
792-
pg_dump -Fc mydb | tiger db upload - --format custom
792+
pg_dump -Fc mydb | tiger db restore - --format custom
793793
794794
# Clean existing objects before restore (DESTRUCTIVE - requires confirmation)
795-
tiger db upload backup.sql --clean --if-exists
795+
tiger db restore backup.sql --clean --if-exists
796796
797797
# Stop on first error (not recommended for cloud environments)
798-
tiger db upload backup.sql --on-error-stop
798+
tiger db restore backup.sql --on-error-stop
799799
800800
# Verbose mode for debugging
801-
tiger db upload backup.sql --verbose
801+
tiger db restore backup.sql --verbose
802802
803803
Note for AI agents: This command may be destructive when used with --clean.
804804
Always confirm with the user before executing, especially with --clean flag.`,
@@ -912,7 +912,7 @@ func buildDbCmd() *cobra.Command {
912912
cmd.AddCommand(buildDbTestConnectionCmd())
913913
cmd.AddCommand(buildDbSavePasswordCmd())
914914
cmd.AddCommand(buildDbCreateCmd())
915-
cmd.AddCommand(buildDbUploadCmd())
915+
cmd.AddCommand(buildDbRestoreCmd())
916916

917917
return cmd
918918
}

0 commit comments

Comments
 (0)