TestLink Docker 資料庫備份與還原

docker ps -a
docker exec -u 0 -it root_mariadb_1 bash
mysqldump -u root -h mariadb bitnami_testlink > backup.sql
docker cp root_mariadb_1:/backup.sql .
lftp [ryan:ryan123@192.168.58.145](<ryan:ryan123@192.168.58.145>)
mput backup.sql
docker cp backup.sql 72fe27da8590:/backup.sql
docker exec -u 0 -it 72fe27da8590 bash
mysql -u root -h mariadb
drop database bitnami_testlink;
create database bitnami_testlink;
mysql -u root -h mariadb bitnami_testlink < backup.sql

--

--

--

NTUT CSIE | Biomedical Informatics Lab | github.com/stwater20 | sectools.tw

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
ryan.chen

ryan.chen

NTUT CSIE | Biomedical Informatics Lab | github.com/stwater20 | sectools.tw

More from Medium

Multi-Arch Docker Images with EC

Project name in docker-compose

Define github action and secrets

Github actions tab

Running Docker Desktop on Linux Mint 20.3 on VMware Workstation Player