How to save a copy of my database? #547
-
I am trying to copy my database and give it public access but I do not want them to be able to change my data in the database but i still want them to be able to use and manipulate the data. How do I do that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Read-only credentials When creating a connection string you can assign it the "read-only" role allowing it to authenticate selects but not queries that update, insert, or delete rows. However, you probably couldn't make these credentials totally public since we'll automatically revoke credentials if they're discovered on the internet (e.g. here on GitHub). If you're creating and distributing a few read-only credentials privately though it might work. Copying a database There's no way to copy an entire database on PlanetScale to another database on PlanetScale other than dumping and restoring. I would recommend using the If you only need one additional copy you could use the restore backup functionality to create a copy in a new branch within the same PlanetScale database. Since connection strings are tied to a single branch at creation time, giving someone read-only access to that restored backup branch won't allow them to access the original branch. |
Beta Was this translation helpful? Give feedback.
Read-only credentials
When creating a connection string you can assign it the "read-only" role allowing it to authenticate selects but not queries that update, insert, or delete rows. However, you probably couldn't make these credentials totally public since we'll automatically revoke credentials if they're discovered on the internet (e.g. here on GitHub). If you're creating and distributing a few read-only credentials privately though it might work.
Copying a database
There's no way to copy an entire database on PlanetScale to another database on PlanetScale other than dumping and restoring. I would recommend using the
pscale db dump
andpscale db restore-dump
functionality in our comman…