wunderio / lando-drupal

0 stars 0 forks source link

#44 Initial DDEV snapshot tooling - missing restart of db container a… #45

Closed hkirsman closed 8 months ago

hkirsman commented 9 months ago

Overview

This is work in progress and experiment to get this https://ddev.readthedocs.io/en/latest/users/usage/cli/#snapshotting-and-restoring-a-database into Lando

Setup

  1. Install this branch with
lando composer require wunderio/lando-drupal:dev-feature/44-Implement-ddev-snapshot-tooling-in-Lando --dev
lando rebuild -y
  1. Create snapshots:
# Create named snapshot.
lando snapshot --name foobar
# Create snapshot with timestamp.
lando snapshot

Restore snapshot. Not sure how to start db container again. It can be done manually with lando restart, but that's not ideal. Then again if we you win 10 minutes of time, then maybe it's ok. Let's create feature request in Lando

# Restore the snapshot named foobar
lando snapshot restore foobar
lando restart
hkirsman commented 9 months ago

It's currently missing this from .lando.base.yml

   database:
   ...
     build_as_root:
       - "apt-get update && apt-get install -y mariadb-backup"

Actually this seems to be there already.