Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Backup and Restore commands #623

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add Backup and Restore commands #623

wants to merge 1 commit into from

Conversation

navarr
Copy link
Member

@navarr navarr commented Mar 21, 2023

No description provided.

@navarr navarr added the enhancement New feature or request label Mar 21, 2023
docker run \
--rm --name $CONTAINER_NAME \
--mount source=$DB_VOLUME,target=/data -v \
$BACKUP_LOC:/backup ubuntu bash \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this can be done with an existing image instead? (or something smaller such as alpine).

docker run \
--rm --name $CONTAINER_NAME \
--mount source=$REDIS_VOLUME,target=/data -v \
$BACKUP_LOC:/backup ubuntu bash \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same suggestion as made earlier.

docker run \
--rm --name $CONTAINER_NAME \
--mount source=$ES_VOLUME,target=/data -v \
$BACKUP_LOC:/backup ubuntu bash \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same suggestion as made earlier.

docker run \
--rm --name $CONTAINER_NAME \
--mount source=$DB_VOLUME,target=/data -v \
$BACKUP_LOC:/backup ubuntu bash \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same suggestion as made earlier.

docker run \
--rm --name $CONTAINER_NAME \
--mount source=$REDIS_VOLUME,target=/data -v \
$BACKUP_LOC:/backup ubuntu bash \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same suggestion as made earlier.

docker run \
--rm --name $CONTAINER_NAME \
--mount source=$ES_VOLUME,target=/data -v \
$BACKUP_LOC:/backup ubuntu bash \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same suggestion as made earlier.

docker run \
--rm --name $CONTAINER_NAME \
--mount source=$ES_VOLUME,target=/data \
-v $(pwd)/.warden/backups/$LATEST_TIMESTAMP/:/backup ubuntu bash \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same suggestion as made earlier.

docker run \
--rm --name $CONTAINER_NAME \
--mount source=$REDIS_VOLUME,target=/data \
-v $(pwd)/.warden/backups/$LATEST_TIMESTAMP/:/backup ubuntu bash \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same suggestion as made earlier.

docker run \
--rm --name $CONTAINER_NAME \
--mount source=$DB_VOLUME,target=/data \
-v $(pwd)/.warden/backups/$LATEST_TIMESTAMP/:/backup ubuntu bash \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same suggestion as made earlier.

-c "tar -czvf /backup/redis.tar.gz /data"

;;
elasticserach)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo. This should be "elasticsearch"

@bap14
Copy link
Contributor

bap14 commented Jul 15, 2023

While I understand the point of this PR, I do wonder if this is the right way to approach a "backup" solution. I'm not sure about redis and elasticsearch, but I've seen times where using the data of one MariaDB version with another prevents MariaDB from starting.

It's safer, and more portable, to just generate an SQL dump into a file (or files). I'm not sure if redis or Elasticsearch have the same mechanism (redis probably not, but ES maybe).

-c "tar -czvf /backup/redis.tar.gz /data"

;;
elasticserach)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should look to add support for OpenSearch here as well, since Warden offers the choice between ES and OS. I'm not certain if the data location is the same (can't see why it would be different) but just something to look at adding.

@bap14
Copy link
Contributor

bap14 commented Jul 15, 2023

Another thing to consider is that this is a generically named "backup" command; however, it's very clearly tailored to a Magento install. If you run the "all" command it's assuming that all the services (DB, Redis, ES) will be utilized in the project; however, not all environments need/use them (e.g. Magento 1, Drupal, etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

None yet

4 participants