Can we upload the backed up local dump file again to planetscale? #262
-
|
For instance, I have a huge database and I have backed it up using planetscale cli in my local computer. But due to unseen circumstances my planetscale database is lost,damaged etc, and I need to upload the local backup in my planetscale now what should I do? Because I don't think there is such thing as local imports in planet scale. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
If you've made a local backup with You could also read in the dump files on the command line or with |
Beta Was this translation helpful? Give feedback.
If you've made a local backup with
pscale database dumpand you want to restore it to a new empty database the simplest way would be to runpscale database restore-dump <database> <branch> --dir <path/to/dump/directory>. You'll have to rename the dump files if your new database has a different name.You could also read in the dump files on the command line or with
source filename.sqljust be sure to load the schema before the data.