Greygoose Posted October 3, 2018 Share Posted October 3, 2018 This is my first attempt using rsync., I have a script that I use which I got from space invaders video. I am trying to convert it to back up a nextcloud folder to my backup unraid server. When I run the script it creates an XML file on the backup server, which indicates 4th from bottom line is incorrect. Id be grateful for some assistance with this to get working. #!/bin/bash #backs up #change the location below to your backup location backuplocation="/mnt/disks/192.168.1.201_backup/nextcloud" # do not alter below this line datestamp="_"`date '+%d_%b_%Y'` dir="$backuplocation"/nextcloud/"$datestamp" # dont change anything below here if [ ! -d $dir ] ; then echo "making folder for todays date $datestamp" # make the directory as it doesnt exist mkdir -vp $dir else echo "As $dir exists continuing." fi echo "Saving nextcloud files" rsync -a --no-o /user/nextcloud $dir/xml/ chmod -R 777 $dir sleep 5 exit Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.