# How to make a Mariadb Backup?

You can perform Mariadb backup by executing the following command:

```shell
sudo docker exec -i MARIADB_CONTAINER_NAME mariadb-dump -u root -p  soffid01 | gzip > /some/path/on/your/host/soffid01.dump.gz
```

This action requires the root password.

You can use:

- `--max-allowed-packet=512M`: sets the maximum packet size to 512MB to handle large databases.
- `--skip-add-locks` and `--skip-lock-tables`: these options are used to improve performance by skipping certain locking mechanisms.

##### Example

[![image-1704804469717.png](https://bookstack.soffid.com/uploads/images/gallery/2024-01/scaled-1680-/image-1704804469717.png)](https://bookstack.soffid.com/uploads/images/gallery/2024-01/image-1704804469717.png)