🔬
Documentation
  • 👋Development Documentation
  • Overview
    • 💡What we do
    • ✨Our Features
  • Product Guides
    • 📪Making a post
    • 📎Understanding Projects
  • Fundamentals
    • 🛠️Getting set up
      • 📝Setting permissions
      • 🧑Inviting Members
  • Use Cases
    • 🎨For Designers
    • Page 1
    • 🖥️For Developers
      • Example of .gitignore
      • Cusotm Theme File Sync script for specified directories with auto git commit
    • ◀️List of Plugins
    • 👨‍💻Tips and Tricks
      • CLI schedule task and consume service
      • ♻️Automatic database backup (Updated)
      • 🛠️Execute a command from host to docker using terminal
      • 📋Shopware 6 commands
      • 😀Activate all plugins via CLI
      • ☠️Kill a process on a port [Linux]
      • 📄How do you import the database using CLI
      • 👨‍🔧Change PHP Configuration [Terminal]
      • 👁️Access to PHP Path Aixspro
      • 🌐Manage Apache services [Linux]
    • 📄SQL Tips & Tricks (shopware 6)
Powered by GitBook
On this page
  1. Use Cases
  2. Tips and Tricks

Execute a command from host to docker using terminal

Import Mysql Dump in container

PreviousAutomatic database backup (Updated)NextShopware 6 commands

Last updated 2 years ago

Sometimes you just want to import your own MySQL backup file.

This can be done in a very easy way, even without bind-mounting or copying the file into the container. It also does not have to do with dockware, so it would also work in a plain MySQL container.

Import using Terminal

Run this command, and it will automatically import the backup.sql file from your database folder into your MySQL instance.

// Import script for mysql
// make sure to create if NEWDB eixist or else create new one
docker exec -i shop mysql -uroot -proot NEWDB < Users/demon/Downloads/Existing.sql

for more details take a look at

👨‍💻
🛠️
Import Database