Calling Developers!
We are reenergizing our code contribution process! Learn More

How do I get a dump of PaaS environment database to local machine

Options
daniel.gebhard
daniel.gebhard Senior Software Developer Spryker Solution Partner Posts: 6 🧑🏻‍🚀 - Cadet
edited July 2023 in Spryker Development

I want to debug a certain error case on my PaaS environment, therefore I would like to work with this on my local machine. How do I create a dump of the database to be able to use it on my local machine?

Best Answer

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,016 ⚖️ - Guardians (admin)
    Answer ✓
    Options

    Heyhey @daniel.gebhard ,

    I asked our cloud team and basically there are multiple possibilities:

    One is to use mysqldump being connected to the env via respective VPN.
    Creds can be found in the AWS ECS -> Task Definitions -> zed\boffice.

    If it's a live Prod, it makes sense to ask the support to provide the dump because dumping directly from live prod DB will lock it.
    And support can do it in two ways:
    1) in case there as internally used RO replica, they will dump it instead of the main one
    2) they can restore 1h old snapshot and dump it instead of the main one.
    And then they can put the dump into S3 where you will just need to download it to the local.

    Hope this helps :)

    All the best,

    Florian

Answers

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,016 ⚖️ - Guardians (admin)
    Answer ✓
    Options

    Heyhey @daniel.gebhard ,

    I asked our cloud team and basically there are multiple possibilities:

    One is to use mysqldump being connected to the env via respective VPN.
    Creds can be found in the AWS ECS -> Task Definitions -> zed\boffice.

    If it's a live Prod, it makes sense to ask the support to provide the dump because dumping directly from live prod DB will lock it.
    And support can do it in two ways:
    1) in case there as internally used RO replica, they will dump it instead of the main one
    2) they can restore 1h old snapshot and dump it instead of the main one.
    And then they can put the dump into S3 where you will just need to download it to the local.

    Hope this helps :)

    All the best,

    Florian

  • daniel.gebhard
    daniel.gebhard Senior Software Developer Spryker Solution Partner Posts: 6 🧑🏻‍🚀 - Cadet
    Options

    Hey @fsmeier,

    thanks a lot! That helps me alot, local dump from DEV works perfectly.

    Greetings,

    Daniel