documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Update section on MySQL/MariaDB bacup

Open theking2 opened this issue 6 months ago • 0 comments

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


Notes

  • Please be patient: this is a large open source project that is overseen by a mixture of volunteers and non-volunteers which are all ultimately busy.
  • If your suggestion is a troubleshooting scenario or one you're not 100% certain about, please post for feedback on the Nextcloud Help Forum first.
    • Then return here to bring back your experience to help improve the documentation for clarity, etc. (and link back to the forum discussion in your report!)

Protip: If you want to help move things along (or just help out in other ways too) here are some suggestions:

  • Look for areas where you can assist - even seemingly unrelated areas - because doing so frees up resources for your favorite topics and ideas.
  • Submit a proposed change - that attempts to addresses your issue - as a pull request.
  • Participate in a discussion on some other unresolved submitted idea ("issues") to help move it along.
  • Post a comment or review on someone else's proposed change ("pull request") to help move it along.

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]

theking2 avatar Jul 15 '25 09:07 theking2