Qovery / Replibyte

Seed your development database with real data ⚡️
https://www.replibyte.com
GNU General Public License v3.0
4.16k stars 128 forks source link

Working with multiple databases #224

Open danilopolani opened 2 years ago

danilopolani commented 2 years ago

Hey, first of all, thank you for the amazing tool!

I was wondering if there's any way to work with multiple databases. AFAIK there's no chance to set multiple sources inside the same configuration file, so in the end, I created two different conf files.

What really confuses me is: why does the script create a "timestamp" folder with inside it 1.dump? I think there will never be the same folder again, so having the incremental number made me think about multiple DB support. This also goes in "conflict" with the name argument: I thought that giving the dump a name would create <name>/1.dump, <name>/2.dump and so on (or maybe <name>/<timestamp>.dump) but actually it always replaces the first dump.

Thank you in advance and sorry if they are two questions in a single issue🙄

evoxmusic commented 2 years ago

I was wondering if there's any way to work with multiple databases. AFAIK there's no chance to set multiple sources inside the same configuration file, so in the end, I created two different conf files.

Indeed, you have to create 2 configuration files. 1 for each source. Can you tell me more about why you want to manage multiple sources from the same conf file?

What really confuses me is: why does the script create a "timestamp" folder with inside it 1.dump? I think there will never be the same folder again, so having the incremental number made me think about multiple DB support. This also goes in "conflict" with the name argument: I thought that giving the dump a name would create /1.dump, /2.dump and so on (or maybe /.dump) but actually it always replaces the first dump.

1.dump, 2.dump, 3.dump are chunks of the full backup. Since Replibyte does the processing in memory, we don't want to keep the full database loaded in memory. By default, the chunk size is 100MB.

Thank you in advance and sorry if they are two questions in a single issue🙄

No problem; next time can you open 2 different threads? 🙏🏽

--

I hope it helps

danilopolani commented 2 years ago

Thank you for your answers!

Indeed, you have to create 2 configuration files. 1 for each source. Can you tell me more about why you want to manage multiple sources from the same conf file?

I have a VPS with 2-3 databases in the same "connection" and I just want to create a dump of all of them; the configuration files are indeed the same except for the database name