# ownCloud Administrators Manual

# Backing Up ownCloud

To backup an ownCloud installation there are three main things you need to retain:

1. The config folder
2. The data folder
3. The database (found in the data folder for sqlite installs)

To restore an ownCloud instance:

1. Extract ownCloud to your webserver
2. Copy over your config folder with your backed up config folder
3. Copy over your data folder with your backed up data folder
4. Import your database
5. Update config.php of any changes to your database connection

## 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.

## Backup Database

### MySQL

MySQL is the recommended database engine. To backup MySQL:

> mysqldump –lock-tables -u [username] -p[password] > owncloud.sql

### SQLite

> sqlite3 owncloud.db .dump > owncloud.bak

### PostgreSQL

> pg_dump owncloud > owncloud.bak