Comments (5)
The top-level volume is specified in compose.yaml.
Even if you destroy a container, the data in the volume remains.
volumes:
db-store:
db:
volumes:
- type: volume
source: db-store
target: /var/lib/mysql
volume:
nocopy: true
from docker-laravel.
Is it possible to move the volume to another server? If it is not possible, it is better to save it locally
from docker-laravel.
@vahidalvandi I can't think of any use case where I would like to store the volume on another server.
I don't think you should directly touch files under /var/lib/mysql except in special cases.
I set it as a volume to prevent users from touching /var/lib/mysql.
If you want to extract MySQL data, I recommend using mysqldump to back up and restore it.
Backup
$ docker compose exec db bash -c 'mysqldump --no-tablespaces -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE > /tmp/dump.sql'
$ docker compose cp db:/tmp/dump.sql /tmp/dump.sql
Restore
$ docker compose cp /tmp/dump.sql db:/tmp/dump.sql
$ docker compose exec db bash -c 'mysql -u $MYSQL_USER -p$MYSQL_PASSWORD $MYSQL_DATABASE < /tmp/dump.sql'
$ rm /tmp/dump.sql
from docker-laravel.
i use this container for automatic backup
backup:
image: ghcr.io/realorangeone/db-auto-backup:latest
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./backups:/var/backups
environment:
- SUCCESS_HOOK_URL=
- INCLUDE_LOGS=true
from docker-laravel.
I have considered it, but have no plans to introduce it in this repository.
from docker-laravel.
Related Issues (20)
- How would I install tailwind to laravel? HOT 1
- Migration mysql driver error HOT 2
- Package 'libicu-dev' has no installation candidate HOT 1
- how i can show file with .file name in ngnix ? HOT 1
- schema:dump command cannot be executed
- schema:dump, mysqldump: unknown variable 'column-statistics=0' and 'set-gtid-purged=OFF' HOT 2
- Add Taskfile
- please add varnish cache server HOT 1
- please add watchtower HOT 1
- Please add frankenphp HOT 1
- packages.json: URL using bad/illegal format or missing URL HOT 2
- cahnge mysql image src HOT 1
- Getting permission denied when I try to change any files in the src folder HOT 4
- Add Hadolint GitHub Actions Workflow
- Error response from daemon: unable to find user phper: no matching entries in passwd file HOT 3
- please show me how i can use next js HOT 2
- please add restart: always HOT 1
- USER phper HOT 1
- Create a non-root user in the ENTRYPOINT
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-laravel.