Clone (update latest changes) in new remote DB in DB Manager on new remote Docker

3 posts were split to a new topic: Improve Database Manager with existing schema changes synchronization

@George when I go to production I’ll most likely move outside of the MySql provided within my Docker Container to a managed DB.

I was wondering if the db_init/db_save.sql would be a way I can clone the schema to a new remote DB that’s not within Wappler? would it work the same way?

Yes but you should just use the database manager and apply the changes on the new target. That is the official way.

The db_init way is for docker only and is just for full backups and as a last resort.

This is also the method I use. I found it as a solution myself in this bug thread. It’s not ideal, but it works. I think for new users it’s really frustrating if this doesn’t work when you want to deploy to live, so better instructions for this in the documentation instead of on the forum would be welcome I suppose. Maybe a copy db structure and data to/from target-functionality would be a good (temporary) solution too.

Unfortunately, if you remember some of the change history is deleted so if I take the official approach it won’t recreate the entire db the same.

But with Mac where is the db_save.sql file?

Hi George.
your suggestion is unfortunately impossible for me to implement
Maybe because I don’t use Windows, but MacOS, I can save the database correctly (I receive confirmation from the program) but then I can’t understand where and how to view the .wappler directory
Or maybe I’m the one who didn’t understand how to do it?
Setting up a site in NodeJS with Wappler and Docker on Hetzner is fantastic and really fast (I have already set up 3 projects) but if I can’t import the data contained in the old databases, I get stuck.

the .wappler folder is hidden. You need to enable hidden files and folders in Finder or in Wappler File Manager - right click in Wapper File Manager and select “Show Hidden” to see it.

1 Like

Thank You

Hello Teodor
I tried but it doesn’t work for me
1- in Local mode I export the database (db_save.sql) from wappler
Schermata 2021-04-05 alle 18.45.19
2- load the file in the PC and modify the database by adding tables and contents
3- I create new sql file and name it db_save.sql
4- I substitute the one exported by Wappler
5- transfer the file to the db_ folder as shown in the image


6- In Production mode I click deploy
Schermata 2021-04-05 alle 19.05.19
But the database was not changed

After countless attempts, I was finally able to load a database with all the tables and all the data contained, taking it from an external database (dump * .sql)
I had to rename the dump file * .sql to db_save.sql, correct the header lines with the editor (copying them from the backup file db_save.sql), and then install it both locally and remotely
Then I restarted Wappler and Docker

I just found out that if you want to switch / migrate from a PHP project to a Nodejs project; you can use this exact method to migrate your database easily from your PHP project to your Nodejs project.

Awesome! :grin: :grin: :grin:

Hi everybody,
@George > Do you know if and how it’s possible to copy from production target to the local one.
I lost some of my changes files, my production DB is uptodate when my local DB is an old schema one.
Many thanks .

Yes you can just choose in the file manager to connect to remote and then download the files you need.

Thanks for your previous answer, i copy-pasted all the files I needed from the remote target (mostly views and SC).

  • Is it possible to get the migrations files from the remote target?
  • How could I copy-paste the production DB to local remote?
    Thanks