Backup and restore scripts that use rsync
and tar
as a way to backup and restore your files and settings.
These scripts assume that you will be backing up to an external media with a considerable amount of space to store your backups.
Performing Backup
- install Git if it is not installed.
- Clone this Repository
git clone,
or download and unzip the zip file. - Copy the
backup.sh Configs and include-lst
files to a folder of your choice. - Change the variables in the
Configs
file to suit your needs. - Add the path to the
Configs
file in thebackup.sh
andrestore.sh
scripts in theCONFIG="/Path/to/Nextcloud-Backup-Restore/Configs"
part. - Go to the folder where you placed the scripts and make them executable with the command
sudo chmod a+x
. - Run the backup:
sudo /path/to/backup.sh
. - Schedule the backup in Cron:
00 00 * * * sudo /path/to/backup.sh
Restore
- edit
backup.sh
with editor of your choice and where is"$DIR01" "$DESTINATIONDIR"
and change it to the following `"$DESTINATIONDIR" "$DIR01".
This Script performs Backup and Restore of a Nextcloud
server installed via snap
.
Performing Backup
- install Git if not already installed.
- Clone this Repository
git clone,
or download and unzip the zip file. - Copy the files from the Nextcloud Folder to a folder of your choice.
- Change the variables in the
Configs
file to suit your needs. - Do not change the Variable
NEXTCLOUD_CONFIG
andTAR_NEXTCLOUD_CONFIG
in yourConfigs
file. - Add the path to the
Configs
file in thebackup.sh
andrestore.sh
scripts in theCONFIG="/Path/to/Nextcloud-Backup-Restore/Configs"
part. - Include the files you do not want to backup from your
./Nextcloud/data
folder in theexclude-lst
file. If you want to backup only some folders or users, include them in theinclude-lst
file and change the command in the script from--exclude-from
to--files-from.
. - Make the
backup.sh.
andrestore.sh.
scripts executable.
Performing Restore
- Make sure your distribution already has snap support enabled, if not do so.
- install the nextcloud snap.
- Run the script
restore.sh.
This Script performs Backup and Restore of Nexcloud
and Plexmediaserver
configurations installed through snap
packages. This script also backs up your /Nextcloud/data.
folder.
Performing Backup
- install Git if it is not installed.
- Clone this Repository
git clone,
or download and unzip the zip file. - Copy the files from the Nextcloud Plex Folder to a folder of your choice.
- Change the variables in the
Configs
file to suit your needs. - Do not change the variables
NEXTCLOUD_CONFIG.
- Add the path to the
Configs
file to thebackup.sh
andrestore.sh
scripts in theCONFIG="/Path/to/Nextcloud-Backup-Restore/Configs"
part. - Include the files you do not want to backup from your
./Nextcloud/data
folder in theexclude-lst
file. If you want to backup only some folders or users, include them in theinclude-lst
file and change the command in the script from--exclude-from
to--files-from.
. - Make the
backup.sh.
andrestore.sh.
scripts executable.
Performing Restore
- Make sure your distribution already has snap support enabled, if not do so.
- install the nextcloud snap.
- Install the plexmediaserver snap
- Run the script
restore.sh.
This Script performs Backup and Restore of your Nextcloud
and emby
server settings. This script also backs up your /Nextcloud/data.
folder.
Performing Backup
- install Git if it is not installed.
- Clone this Repository
git clone,
or download and unzip the zip file. - Copy the files from the Nextcloud Plex Folder to a folder of your choice.
- Change the variables in the
Configs
file to suit your needs. - Do not change the variables
NEXTCLOUD_CONFIG.
- Add the path to the
Configs
file in thebackup.sh
andrestore.sh
scripts in theCONFIG="/Path/to/Nextcloud-Backup-Restore/Configs"
part. - Include the files you do not want to backup from your
./Nextcloud/data
folder in theexclude-lst
file. If you want to backup only some folders or users, include them in theinclude-lst
file and change the command in the script from--exclude-from
to--files-from
. - Make the
backup.sh.
andrestore.sh.
scripts executable
Performing Restore
- Make sure your distribution already has snap support enabled, if not do so.
- install the nextcloud snap.
- Install emby
- Run the script
restore.sh.
For Installations run Nextcloud snap and Plex together.
. Use this other script https://github.com/edsonsbj/Nextcloud-Plex-Onlyoffice-Aria2c-qBitorrent to perform the installation and configuration of the packages.
. If after the restore appears any error related to your data folder and ocdata file run these commands:
Linux Partitions
sudo chown -R root:root /patch/Nextcloud/data
chmod 0770 /patch/Nextcloud/data
.
NTFS partitions
Run the command sudo blkid -o list -w /dev/null
and note the uuid of the mounted partition.
Add to your fstab file UUUID=040276482A715ABE /mnt/Nextcloud ntfs-3g utf8,uid=root,gid=root,umask=0007,noatime 0 0
. Don't Forget to Replace the UUUID
and mountpoint /mnt/Nextcloud
from the example above to the uuid and mountpoint corresponding to your drive.