I provide for my customers 5GB Cloud Space.
A customer asked me, if it is possible to place the backups in his cloudspace once a week.
I said, i try to find a solution.
Here is my HowTo if somebody need it:
Install OwnCloud on a Webspaceaccount as described here http://owncloud.org/install/
It is ok, to use sqlite as DB.
Make sure, that this domain has disabled the backup function in i-MSCP (or only sql if you use sqlite).
You can leave it to full only if the domain which is running owncloud is the first domain added on this server (i.e. vu2003).
Login into your server via ssh
create the folder "backups" in /var/www/virtual/CLOUDDOMAIN.DE/htdocs/CLOUDFOLDER/core/skeleton/
Add all user in OwnCloud and login once in their account to create the folders. sorry, i didn´t found another solution for this ( YET ) without a rewrite of the owncloud code.
After that, you have to modifie the file /etc/imscp/imscp.conf
Search for:
Add after this: (replace CLOUDDOMAIN.DE with your domain and CLOUDFOLDER with the folder of your OwnCloud installation)
create a copy of /var/www/imscp/engine/backup/imscp-backup-all
modify the file /var/www/imscp/engine/backup/imscp-backup-cloud
Search for:
change it like this:
The last is, to add a cronjob to start the script once a weel
goto /etc/cron.d
create a file with the name cloud and fill it with the following
(change the vuXXXX with the vu of owncloud and the path to the data directory )
- ## cron.d/cloud -- schedules periodic start of imscp-backup-cloud to# create backups from user webfolder and databases into users owncloud space## Copyright © Peter Ziergoebel <info@fisa4.de>## Run once a week on sunday* * * * 0 root /var/www/imscp/engine/backup/imscp-backup-cloud yes &>/var/log/imscp/imscp-backup-cloud.log && chown -R vuXXXX:vuXXXX /var/www/virtual/CLOUDDOMAIN.DE/htdocs/CLOUDFOLDER/data/
Restart cron
IMPORTANT !!!
After an update of i-MSCP the imscp.conf has to be edit again.
That´s it.