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

What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello everyone. Is there a best practice or some workflow for doing rollbacks in AWS/Spryker Cloud e

Options
USZ0XG6SK
USZ0XG6SK Posts: 111 🧑🏻‍🚀 - Cadet

Hello everyone. Is there a best practice or some workflow for doing rollbacks in AWS/Spryker Cloud environment? Rolling back the code base to a previous version is just a matter of creating containers from some older images, but what is the right (or the best) way to roll back database, redis and elasticsearch?

Comments

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 🏛 - Council (mod)
    Options

    Hi Neven. Great question. Let me that that to our experts. I will keep you posted

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 🏛 - Council (mod)
    Options

    @USZ0XG6SK can i have a couple of days to compile a good answer for you?

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 🏛 - Council (mod)
    Options

    or is this an urgent matter?

  • USZ0XG6SK
    USZ0XG6SK Posts: 111 🧑🏻‍🚀 - Cadet
    Options

    Hi @tom.lehner, it is not so urgent. I would be happy if i get an answer until the end of next week.

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 🏛 - Council (mod)
    Options

    should be doable, i will keep you posted

  • USZ0XG6SK
    USZ0XG6SK Posts: 111 🧑🏻‍🚀 - Cadet
    Options

    thanks 👍

  • USZ0XG6SK
    USZ0XG6SK Posts: 111 🧑🏻‍🚀 - Cadet
    Options

    @tom.lehner any news here?

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 🏛 - Council (mod)
    Options

    Still in the works, sorry

  • UMZRJAE7M
    UMZRJAE7M Posts: 31 🧑🏻‍🚀 - Cadet
    Options

    any update? This is a very interesting question

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 🏛 - Council (mod)
    Options

    Let me check the status on it

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 🏛 - Council (mod)
    Options

    We are currently just finishing up the documentation. Should be ready for release shortly

  • Thomas Lehner
    Thomas Lehner Support Engineer @ Spryker Posts: 289 🏛 - Council (mod)
    Options

    Here is a preliminary version I can share with you. The final version will be published in our documentation sometime next week.

  • UMZRJAE7M
    UMZRJAE7M Posts: 31 🧑🏻‍🚀 - Cadet
    Options

    thx,
    this is just a documentation how to restore a database backup.
    I'm more interested in rolling back a deployment without deleting data. When restoring the backup, things like e.g. orders or new customer accounts that happened in the meantime will be deleted

  • Hi Philipp,

    There are 2 different options, what is possible to rollback, actually 3 when needed:
    1. DB: using a previously created snapshot you can restore the whole DB (structure + data)
    2. Application: using a deploy function with a dedicated version (GitHub commit)
    3. Do steps 1 and 2 simultaneously
    It sounds to me you are asking about the 2nd step and it is covered in the documentation here: https://cloud.spryker.com/docs/deploying-in-a-production-environment#roll-back-an-application

    Could you please check it and let us know if that is what you are looking for?
    Thank you.

    P.S. there is no backup and this restore solutions for redis, ES at the moment.

  • Unknown
    edited November 2020
    Options

    We treat the DB as a single source of truth. Thus, there are solutions to backup and restore:
    1. data in database (backup and restore RDS)
    2. application or code (deploy a specific version).
    Everything else should be updated from these 2 places: DB or code of application.
    With backups of many interconnected pieces a new problem would need to be solved: keep all moving part in a consistency, when backed up and when restored.

  • USZ0XG6SK
    USZ0XG6SK Posts: 111 🧑🏻‍🚀 - Cadet
    Options

    So basically suggested way to go is to
    • deploy older docker image
    • restore a db from a snapshot and then run data sync to sync the data with ES and redis
    Is there a reason why aren’t you suggesting the Propel Migrations? This seems to me a better way to revert the database structure without loosing the data.
    If we restore the DB from a snapshot, it would mean that we lose potential data saved since last snapshot (max 1 hour in this case), which, in a high traffic shop, would mean a large potential loss.

  • Unknown
    edited November 2020
    Options

    Propel Migrations are also possible, but requires code changes.
    With RDS backup/restore no code changes are needed, as only AWS services need to be triggered.
    It is just a different approach.

  • UMZRJAE7M
    UMZRJAE7M Posts: 31 🧑🏻‍🚀 - Cadet
    Options

    RDS Backup & Restore is of cause the "easier" way, but as Neven wrote, there will be a loss of data, which doesn't sound too cool