When you install ownCloud from packages, follow these steps to restore your ownCloud installation. Start with a fresh ownCloud package installation in a new, empty directory. Then restore these items from your backup (see backup):
Your ownCloud database.
Your custom theme files, if you have any. (See Theming ownCloud)
When you install ownCloud from the source tarballs you may safely restore your entire ownCloud installation from backup, with the exception of your ownCloud database. Databases cannot be copied, but you must use the database tools to make a correct restoration.
When you have completed your restoration, see Set Strong Directory Permissions.
Simply copy your configuration and data folder to your ownCloud environment. You could use this command, which restores the backup example in backup:
rsync -Aax config data /var/www/owncloud/
There are many ways to restore normal files from backups, and you may use whatever method you are accustomed to.
This guide assumes that your previous backup is called
MySQL is the recommended database engine. To restore MySQL:
occ maintenance:mode --on mysql -h [server] -u [username] -p[password] [db_name] < owncloud-dbbackup.bak occ maintenance:data-fingerprint occ maintenance:mode --off