Good Day,
To all,
First nice work for the nextcloud,
FYI I’m newbie using linux…
We are looking for the cloud storage for archiving.
And we want to try and evaluate the nextcloud.
I already install nextcloud in ubuntu 18.04 using snap.
Because I installed using snap all are automatically installed the requirements
I saw the details of the server in settings after log in is PHP version, MYSQL for database, and nextcloud version
Question for backup and restore
How can i create nextcloud main folder backup
How can i create database backup
and how to restore…
and how can i view the database credentials (database name and user)
Thank you in advance and More Power
eehmke
November 19, 2019, 12:43pm
2
Database credentials are in your config/config.php.
Backup:
set nextcloud in maintenance mode via occ
Create a tar.gz of the nextcloud installation folder
Create a tar.gz of the nextcloud data folder (if it is not inside the installation folder, which it should not)
Create a mysqldump of the database
Deactivate maintenance mode via occ
To restore: all in reverse
1 Like
follow the readme.md
Ansible playbook to install nextcloud, php, nginx or apache, mariadb or postgres, redis-server, onlyoffice or collabora office - GitHub - ReinerNippes/nextcloud: Ansible playbook to install nextclo...
backup is configured if you define a backup target:
# php Version
php_version = '7.3'
# Install turn server for Nextcloud Talk
talk_install = false
# Allways get the latest version of Nextcloud
next_archive = https://download.nextcloud.com/server/releases/latest.tar.bz2
# Install restic backup tool if backup_folder is not empty
# more info about restic: https://restic.readthedocs.io/en/latest/
# to use a local directory as a restic repository (not a good idea anyway)
restic_repo = '' # e.g. '/var/backups/nextcloud'
# use rclone to backup a cloud storage, see https://rclone.org for more details
# configure also rclone_remote in group_vars/all.yml
# restic_repo = "rclone:backup-selfhosted:selfhosted-{{ lookup('password', '{{ credential_store }}/restic_backup_s3_bucket_uid chars=ascii_lowercase,digits length=12') }}/backup"
# crontab setings for the backup script - default daily at 3pm
restic_backup_day = '*'
that was the easy part.
there no restore script yet. although it’s easy to restore using restic. if you know how. have a look at the restic manual.
backup to the same filesystem makes no sense. better you backup to some kind of cloud storage (aws, azure, digitalocean,…). you’ll find some examples in my repo and restic/rclone docu. but it can be challenging.
you won’t be happy with nextcloud using my playbook if you don’t have basic linux skills. it just save you from copy&pasting one of the many howtos out there. but in case of an outage you have to fix the problem on your own.
1 Like
Thank you Sir @DecaTec for the scripts
I’ve moved from GitHub to Codeberg.
You can find the repository with the scripts here: