I have the following setup:
- Ubuntu Server 16.04.1 LTS
- Nextcloud 10.0.1 with PHP7, Apache2, MariaDB und RedisServer
- my Nextcloud folder is here: /var/www/nextcloud
- my Nextcloud Data is here /var/nextclouddata
- I have three folders to backup the Nextcloud folder, ~ Data and the database:
I just found this in the admin manual (https://docs.nextcloud.com/server/10/admin_manual/maintenance/backup.html)
rsync -Aax nextcloud/ nextcloud-dirbkp_
mysqldump --lock-tables -h [server] -u [username] -p[password] [db_name] > nextcloud-sqlbkp_
My wish is to have a planed task wich saves the three parts every day.
My first problem is, that I have no idea how to change the rsync command to my parameters (/media/ncbackup…)
Second the mysqldump command cancels with the message “No permission”
Do I have to change the mysqldump like this:
mysqldump --lock-tables -h nextcloudserver -uroot -psecret nextclouddb > /media/ncbackup/database/nextcloud-sqlbkp_
My linux skills are very very loooow, but I hope you can help me.
Thank you in advance.