I currently backup a MySQL docker container using a shell script, it dumps the mysql file into a relative directory, such as..
set-e TODAY=`date +"%d%b%Y"` mysqldump -uroot -p"$MYSQL_ROOT_PASSWORD" -h $MYSQL_HOST --all-databases | gzip > /data/mysqldb/$TODAY/all-databases-$TODAY.sql.gz
I need to create a restore script that will read the $TODAY and determine which is most recent. How do I do this? :S