Skip to content

Update section on MySQL/MariaDB bacup #13420

@theking2

Description

@theking2

Thanks for helping improve our documentation!

  • There is always room for improvement!
  • All contributions (changes and change ideas) - from the largest to the tiniest - help make Nextcloud better and easier to use!

Update Backup — Nextcloud section on MySQL/MariaDB

The official MariaDB documents suggest using mariadb-dump to create backups of a MariaDB database.

To backup MariaDB

```
mariadb-dump --user=[dbuser] --password=[dbpassword] [dbname] > nextcloud-sqlbkp_`date +"%Y%m%d"`.bkp
```

or compress if the database is large

```
mariadb-dump --user=[dbuser] --password=[dbpassword] [dbname] | gzip > nextcloud-sqlbkp_`date +"%Y%m%d"`.bkp.gz
```

To restore MariaDB

```
mariadb --user=[dbuser] --password=[dbpassword] < nextcloud_sqlbkp_.bkp
```

or if compressed

```
gunzip nextcloud_sqlbkp.bkp.gz | mariadb --user=[dbuser] --password=[dbpassword]
```


Addressed in #14850

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions