mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-04 02:36:49 +07:00
Conflicts: admin_manual/configuration/custom_mount_config_gui.rst admin_manual/maintenance/backup.rst admin_manual/maintenance/restore.rst
44 lines
985 B
ReStructuredText
44 lines
985 B
ReStructuredText
Restoring ownCloud
|
|
==================
|
|
|
|
To restore an ownCloud installation there are three main things you need to restore:
|
|
|
|
#. The config folder
|
|
#. The data folder
|
|
#. The database
|
|
|
|
Restore Folders
|
|
---------------
|
|
|
|
.. note:: This guide assumes that your previous backup is called "owncloud-dirbkp"
|
|
|
|
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-dirbkp/ owncloud/
|
|
|
|
Restore Database
|
|
----------------
|
|
|
|
.. note:: This guide assumes that your previous backup is called "owncloud-sqlbkp.bak"
|
|
|
|
MySQL
|
|
^^^^^
|
|
|
|
MySQL is the recommended database engine. To backup MySQL::
|
|
|
|
mysql -h [server] -u [username] -p[password] < owncloud-sqlbkp.bak
|
|
|
|
SQLite
|
|
^^^^^^
|
|
::
|
|
|
|
sqlite3 data/owncloud.db .dump < owncloud-sqlbkp.bak
|
|
|
|
PostgreSQL
|
|
^^^^^^^^^^
|
|
::
|
|
|
|
PGPASSWORD="password" pg_restore -c -d owncloud -h [server] -U [username] owncloud-sqlbkp.bak
|
|
|