Answer the question
In order to leave comments, you need to log in
How are Postgresql and Mysql databases migrated?
Help clarify the situation and understanding about databases. There is a database such as Sqlite3, there is one file and everything is in it. With it, everything is simple, you wear it with the project and there are no problems.
And there are separate databases, Postgresql and Mysql are currently interested, a separate system is installed with them to support and operate this database.
And if, for example, I am developing a project and have already created certain records in the database, how can I then transfer it to the server (hosting) during deployment? After all, there is no longer one file.
And another question - if the site is already spinning on some server, and you have to transfer the site to another server, again - how to transfer the database, saving all the data? Is it too problematic?
And the third question - do various servers (hostings) provide database backups? Or do you need to do this yourself and set up a backup for yourself somehow? After all, if a database falls down (deleted, hacked and deleted, etc.) in which there are more than 1000+ different records and users, etc., then this is already very painful.
Answer the question
In order to leave comments, you need to log in
The dump has already been written about.
And the third question - do various servers (hostings) provide database backups? Or do you need to do this yourself and set up a backup for yourself somehow?
You can make a dump with regular utilities.
You can, if your database is small or vice versa - hefty and its restoration takes a long time, put out the DBMS and copy datadir .
Many options
Make a dump and deploy it to another base.
Raise replication, wait until the databases are synchronized, remove the old one.
If the databases are the same version, you can, of course, stupidly copy the files, but this is rarely practiced.
When transferring data from one version to another, you need to look at what the vendor writes about this. It can either just turn around or require a special conversion procedure.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question