Skip to content

Instantly share code, notes, and snippets.

View CleversonSA's full-sized avatar
💭
Migrando do bitbucket

Cleverson SA CleversonSA

💭
Migrando do bitbucket
View GitHub Profile
@superseb
superseb / readme.md
Created November 9, 2017 15:02
Restore MySQL database on bind-mounted directory for rancher/server

Restore MySQL database on bind-mounted directory for rancher/server

When you run rancher/server with a bind-mounted directory, both processes (MySQL and cattle) are always running so it can be hard to restore a backup.

Backup

Creating a backup can be done using:

docker exec rancher_server_id mysqldump --default-character-set=utf8 --databases cattle > cattle.sql

This will save the database called cattle (default) to cattle.sql on the host.