diff --git a/Makefile b/Makefile index 6d0ad4b54b..d262b56f89 100644 --- a/Makefile +++ b/Makefile @@ -236,17 +236,17 @@ dev.mysqlrestoredump: dev.up.mysql80 ## Write all data volumes to the host, except for mysql, just use mysqldump dev.backup: dev.up.mongo+elasticsearch710+opensearch12+coursegraph dev.mysqldumpall - docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.mongo) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zcvf /backup/mongo.tar.gz /data/db - docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.elasticsearch710) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zcvf /backup/elasticsearch710.tar.gz /usr/share/elasticsearch/data - docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.opensearch12) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zcvf /backup/opensearch12.tar.gz /usr/share/opensearch/data - docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.coursegraph) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zcvf /backup/coursegraph.tar.gz /data + docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.mongo) -v $$(pwd)/.dev/backups:/backup arm64v8/debian:latest tar zcvf /backup/mongo.tar.gz /data/db + docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.elasticsearch710) -v $$(pwd)/.dev/backups:/backup arm64v8/debian:latest tar zcvf /backup/elasticsearch710.tar.gz /usr/share/elasticsearch/data + docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.opensearch12) -v $$(pwd)/.dev/backups:/backup arm64v8/debian:latest tar zcvf /backup/opensearch12.tar.gz /usr/share/opensearch/data + docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.coursegraph) -v $$(pwd)/.dev/backups:/backup arm64v8/debian:latest tar zcvf /backup/coursegraph.tar.gz /data ## Restore all data volumes from the host. WILL OVERWRITE ALL EXISTING DATA! dev.restore: dev.up.mongo+elasticsearch710+opensearch12+coursegraph dev.mysqlrestoredump - docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.mongo) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zxvf /backup/mongo.tar.gz - docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.elasticsearch710) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zxvf /backup/elasticsearch710.tar.gz - docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.opensearch12) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zxvf /backup/opensearch12.tar.gz - docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.coursegraph) -v $$(pwd)/.dev/backups:/backup debian:jessie tar zxvf /backup/coursegraph.tar.gz + docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.mongo) -v $$(pwd)/.dev/backups:/backup arm64v8/debian:latest tar zxvf /backup/mongo.tar.gz + docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.elasticsearch710) -v $$(pwd)/.dev/backups:/backup arm64v8/debian:latest tar zxvf /backup/elasticsearch710.tar.gz + docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.opensearch12) -v $$(pwd)/.dev/backups:/backup arm64v8/debian:latest tar zxvf /backup/opensearch12.tar.gz + docker run --rm --volumes-from $$(make --silent --no-print-directory dev.print-container.coursegraph) -v $$(pwd)/.dev/backups:/backup arm64v8/debian:latest tar zxvf /backup/coursegraph.tar.gz # List of Makefile targets to run database migrations, in the form dev.migrate.$(service) # Services will only have their migrations added here diff --git a/instructions.txt b/instructions.txt new file mode 100644 index 0000000000..6a83df806e --- /dev/null +++ b/instructions.txt @@ -0,0 +1,32 @@ +# YOU MUST USE THIS DEVSTACK BRANCH: https://github.com/openedx/devstack/pull/1282 +# Create a "just in case" directory to keep all your backup files +# outside of the devstack directory +mkdir ~/devstack-backups-march-6-2024/ + +cd $DEVSTACK_WORKSPACE/devstack +git pull +git checkout aed/mysqldump + +## This will now create both a mysqldump output SQL file, and +## some tar'd data directories for the other database types. +make dev.backup +cp .dev/devstackall.sql ~/devstack-backups-march-6-2024/ +cp .dev/backups/*.tar.gz ~/devstack-backups-march-6-2024/ + +## NOW BACKUP ALL THE ENTERPRISE IDAS +### enterprise-catalog +cd $DEVSTACK_WORKSPACE/enterprise-catalog +make dev.backup +cp .dev/enterprise_catalog_all.sql ~/devstack-backups-march-6-2024/ +### license-manager +cd $DEVSTACK_WORKSPACE/license-manager +make dev.backup +cp .dev/license_manager_all.sql ~/devstack-backups-march-6-2024/ +### enterprise-access +cd $DEVSTACK_WORKSPACE/enterprise-access +make dev.backup +cp .dev/enterprise_access_all.sql ~/devstack-backups-march-6-2024/ +### enterprise-subsidy +cd $DEVSTACK_WORKSPACE/enterprise-subsidy +make dev.backup +cp .dev/enterprise_subsidy_all.sql ~/devstack-backups-march-6-2024/ \ No newline at end of file