mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-04 02:36:49 +07:00
Currently, user_management page is on user_manual (written by @lateral-thinker). This commit updates the page and moves it into admin_manual. This commit also updates app configuration page with the new information.
40 lines
889 B
ReStructuredText
40 lines
889 B
ReStructuredText
Backing up ownCloud
|
|
===================
|
|
|
|
To backup an ownCloud installation there are three main things you need to retain:
|
|
|
|
#. The config folder
|
|
#. The data folder
|
|
#. The database
|
|
|
|
Backup Folders
|
|
--------------
|
|
|
|
Simply copy your config and data folder (or even your whole ownCloud install and data folder) to a place outside of
|
|
your ownCloud environment. You could use this command::
|
|
|
|
rsync -Aax owncloud/ owncloud-dirbkp_`date +"%Y%m%d"`/
|
|
|
|
Backup Database
|
|
---------------
|
|
|
|
MySQL
|
|
^^^^^
|
|
|
|
MySQL is the recommended database engine. To backup MySQL::
|
|
|
|
mysqldump --lock-tables -h [server] -u [username] -p[password] > owncloud-sqlbkp_`date +"%Y%m%d"`.bak
|
|
|
|
SQLite
|
|
^^^^^^
|
|
::
|
|
|
|
sqlite3 data/owncloud.db .dump > owncloud-sqlbkp_`date +"%Y%m%d"`.bak
|
|
|
|
PostgreSQL
|
|
^^^^^^^^^^
|
|
::
|
|
|
|
PGPASSWORD="password" pg_dump owncloud -h [server] -U [username] -f owncloud-sqlbkp_`date +"%Y%m%d"`.bak
|
|
|