Database restore for already update code

Hi, actually I have 3 sites (development, testing, production).

They have at start the same installation, and a repository reference.
Already update the code in testing for all the customizations done on dev site through github.

How can I restore correctly the database? I was reading about this steps

bench restore {sitename} {path/to/sqlbackupfile}

But seems like I have to do and update of version if anything goes wrong… And I must use v6 living in my repository.

Thanks in advance

`

… have at start the same installation, and a repository reference

what’s a repository reference?

Change the default repository of erpnext at frappe_bench, set_up bench in order to avoid overwritting.

sounds interesting … I don’t really follow I have to admit. Would you mind to explain your setup and how you use it in a little more detail? I am thinking about how to figure out a good setup myself.

At present think in utilizing qemu snapshots (running in a qemu/KVM here) to achieve such asetup for a testing vs a production server but would be interested to understand how you actually are doing (apparently in one machine which might be a slicker approach).

@violetasdev any chance to hear from you in this matter? In case I wasn’t clear enought …
what I am interest in is how you use 3 sites on one machine for production, testing, development practically.

I assume you must have some sort of routine with restoring your production database to the testing machine, so you test with ‘real-life’ data?

Just would be really great to read how you practically step-by-step do that

What do you mean by restore? I think you may want to migrate

bench --site [sitename] migrate

No @rmehta

What I wanted to acomplished is get a detailed (sort of) query execution story in order to track the jobs done along the erpnext use. Why? 'Cause I’m managing 3 diferent development environments. So, if something happens at code (custom scripts, etc) I can just migrate that part to the next instance.

For now I’m managing that through documentation.

@vrms I have 3 different machines runing. Development (where I “create” the custom codes and doctypes), Testing (where I test the dev side) and deploy (where the user is using the erp). It allow us to manage the code requests from the final users.

Everything is manage by github, just commit, push and pull the correct branchs so we can follow. If you saw ERPNext repository you will see something similar.

machines? I though you where running 3 sites (Development,Testing & deploy) on 1 single machine? did I get that wrong?

if you could describe that setup in detail … that would be awesome. I assume you are running privat repositories?

Yup. You get it wrong :slight_smile:

Yeah, private repositories. Will post the process later :slight_smile:

1 Like

awesome. looking forward to reading about that. Do you also store your database & attachments with git? I have seen there is a plugin for large files

@violetasdev do you think you’ll find a minute to describe your process/setup here for us at some point …?

Hi @vrms

So sorry didn’t reply on time!!! Tell me if you still need this and I will do an specific post about it. I am currently retaking ERPNext topcis after some other implementatios,

Regards,

thanks, really appreciate the persistence. Let me get back on track with this and get back to you thereafter, ok?