FunkyBuddha Posted May 21, 2024 #1 Posted May 21, 2024 Automate and schedule your NextCloud backups using the script below. Notes: Change the path of the NextCloud and Back Directory This set up assumes a docker installation It stops the NextCloud instance before backing up Backup uses tar with compression to a remote folder. Filenames are date stamped NextCloud starts after backup Bash Script: Quote #!/bin/bash NEXTCLOUD_DATA_DIR="/my/path/nextcloud" BACKUP_DIR="/srv/remotemount/my/path/bkup" sudo docker stop nextcloud sudo tar -czf $BACKUP_DIR/nextcloud_data_backup_$(date +%F).tar.gz $NEXTCLOUD_DATA_DIR sudo docker start nextcloud 1
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now