How to get ownCloud backup files just in case of data loss? Here you can find 2 different ways to backup ownCloud files and databases with screenshot for reference.
Quick Navigation:
How to perform ownCloud backup and restore easily?
Is it planned to implement a way to do proper backups and restore on OCIS? While this app is generally available for use it’s a bit frightening that I don’t have a secure way of backing everything up.
Sure I take backups of the OCIS folder but I can only pray that it works to restore in case of data loss.
- Question from central.ownCloud.org
ownCloud is an open-source, self-hosted file synchronization and sharing platform for Linux, Windows, macOS, iOS and Android for personal and business use. It allows you to store your files, contacts, calendars, and more on a server of your choosing, rather than relying on third-party services.
How to protect your precious files in ownCloud easily? Here you can find 2 ways to backup ownCloud automatically or manually. The detailed steps are listed below for references. Now, keep reading to get more.
Generally speaking, it’s complicated for you to backup ownCloud data without professional cloud backup software. If you are good at the skill of coding, you can try the next way to backup ownCloud files. However, is there any easy way to backup ownCloud quickly and entirely? Definitely. Here comes the powerful web-based multi-cloud storage manager - MultCloud to help.
Thus, how to backup ownCloud files for data protection, check the below part.
Here we will show you how to backup ownCloud to Amazon S3 for example, so check its steps here:
1. Please register a MultCloud account, and then log in.
2. Select Add Cloud > ownCloud, and input the credentials to grant access to MultCloud. Then add Amazon S3 as well.
3. Tap Cloud Backup, choose ownCloud as the source, and Amazon S3 as the target.
Tips:
4. Press on the Backup Now button to backup ownCloud to Amazon S3.
To backup ownCloud files, you have to backup all the directories:
Use the following command to backup all folders in ownCloud:
rsync -Aax config data apps apps-external /yourbackupdestination/
Before backing up the database in ownCloud, you have to set up your ownCloud instance to Maintenance mode using the below command:
sudo -u www-data ./occ maintenance:mode --on
Then use mysqldump command to backup your ownCloud database, the mysqldump command syntax is:
mysqldump [options] db_name [tbl_name ...] > backupfilename.sql
mysqldump [options] --databases db_name ... > backupfilename.sql
mysqldump [options] --all-databases > backupfilename.sql
Thus, you can input the below command to backup all databases in ownCloud:
sudo mysqldump --single-transaction -h [server] -u [username] -p [password] --all-databases > ownCloud-dbbackup_`date +"%Y%m%d"`.bak
Then reactivate your ownCloud instance using the command:
sudo -u www-data ./occ maintenance:mode --off
It’s quite complex for ordinary people because you have to get the command skill to backup your ownCloud data.
If you don’t want to use command lines to backup ownCloud database like MySQL, or other databases, it’s highly recommended to use MultCloud to backup easily. So, backup ownCloud MySQL database to Synology NAS with the following guide:
1. Please add the ownCloud database by clicking Add Cloud > MySQL subsequently, then follow the guide to add. Add Synology NAS accordingly.
2. Tap Cloud Transfer, choose ownCloud MySQL database as the source, and Synology NAS as the destination directory.
3. Press the Transfer Now button to backup ownCloud database to Synology NAS directly.
Tip: Except for the schedule, filter in Options. You can also set up the transfer methods, like keeping the modification date, keeping all files in one folder, and so on.
If you would like to use the command line way to restore ownCloud backup, check the steps from the ownCloud official website and we will not show you this again because it’s complicated. Here we are going to show you the easy way to restore ownCloud backup with MultCloud, here it is:
1. Hit Task List from the left side, and find the ownCloud backup task, then tap the three-line icon, and select Restore from the list.
2. Select versions, and restore options, and check the files you'd like to restore, or all of them, and hit Next.
3. Tick Restore to original location or Restore to new location, and hit Restore to restore files from ownCloud backup.
Until now, the best free way to backup ownCloud is on the table from the above solutions. Compared with these two ways, MultCloud is easier for all of us rather than the command line operations. Besides, MultCloud helps you to sync two ownCloud servers directly, connect Google Drive to ownCloud, etc. So, why not give it a try?