-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
base: main
Are you sure you want to change the base?
Conversation
docker run \ | ||
--rm --name $CONTAINER_NAME \ | ||
--mount source=$DB_VOLUME,target=/data -v \ | ||
$BACKUP_LOC:/backup ubuntu bash \ |
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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 \ |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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"
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) |
There was a problem hiding this comment.
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.
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.). |
No description provided.