tazire Posted July 7, 2020 Posted July 7, 2020 Ok i tried to google this and just cant find anything to help. essentially the title says it all really. I am making a few changes. I am moving my appdata off the cache drives onto an nvme drive im expecting. I then want to change my cache drives to RAID 0 and run nextcloud off this only. I currently have duplicati backing up my nextcloud to backblaze but id like to have another share on my array as a direct copy of the nextcloud (cache only) share. for immediate availablity should i have cache drive issues. What is my best option to achive this? rsync the whole share to the other share? and whats the best way to have this occure automatically every day or once a week etc? Quote
Divi Posted July 16, 2020 Posted July 16, 2020 I also would like to create daily backup of the shares on cache disk (appdata, domains, isos, system) and store the backup on array. This would be enough safety for me to run single cache disk instead of 2 disk pool. I think setting up rsync script with cronjob would be one option, but I'm not sure how to do this. Another possible way might be installing DirSyncPro docker, but I'm not familiar with this either. Both options sound really complicated for such a simple job. I'm sure this is trivial job for more experienced linux/unraid users, so please share what is the best way? Quote
Divi Posted July 19, 2020 Posted July 19, 2020 (edited) I took some time yesterday to try rsync/crontab method. Managed easily to make a script with rsync that creates the copy of cache on array, but didnt manage yet to automate the script with crontab. I'll repost when I get the automation working. Rsync and Crontab both come preinstalled on unraid, so its just matter of writing the commands in correct files to be run daily/weekly/whatever. my rsync command which works fine when run in terminal: rsync -r -av --delete /mnt/cache/domains/ /mnt/user/vault/Backups/Unraid/Cache/domains -r = recursive -a = archive files and directory while synchronizing -v = verbose --delete = delete files from destination, that are no longer found in source (good for my use case, not for most backups) /mnt/cache/domains/ = source /mnt/user/vault/Backups/Unraid/Cache/domains = destination Edited July 19, 2020 by Divi 2 Quote
itimpi Posted July 19, 2020 Posted July 19, 2020 Rather than trying to set up entries in crontab yourself and making them persist across reboots it would be much easier to install the User Scripts plugin to run the script at the schedule you want. Quote
Divi Posted July 21, 2020 Posted July 21, 2020 ^ Thank you! Tried user scripts and it seems awesome way to automate stuff around unraid. Really easy to make new script, copy-paste you command and set schedule when to run the script. Made these four separate scripts for four shares on my Cache drive, so I can schedule them differently if I want: Example how my Appdata backup script looks: 2 Quote
tylah337 Posted October 30, 2020 Posted October 30, 2020 Hey, can you please link all 4 scrips so that i can copy paste them since i cant really seem to figure them out on my own? i m trying to backup some vms that i use as a medical database and your solution would work wonders! also if i need to restore do i just reverse the order in the script? Thank you in advance!! Quote
dopeytree Posted August 23, 2022 Posted August 23, 2022 This should be built into the system... 1 2 Quote
dopeytree Posted January 6, 2023 Posted January 6, 2023 Would you be better just backing up the whole cache disk? That way it would cover any new shares + also backup any new folders before moving to array for other shares etc. While I know what is basically what mirroring does there is a big performance hit using mirror for some reason. Quote
Ellis34771 Posted January 11 Posted January 11 On 1/6/2023 at 9:07 AM, dopeytree said: Would you be better just backing up the whole cache disk? That way it would cover any new shares + also backup any new folders before moving to array for other shares etc. While I know what is basically what mirroring does there is a big performance hit using mirror for some reason. Wouldn't that inadvertently pick up files meant for the mover as well? Quote
dopeytree Posted January 11 Posted January 11 (edited) Not quite sure what you mean. Mover is a binary on / off action so it has either moved or not moved. Any backup of a cache drive will contain files not moved to array. So mover would run when set and then each cache backup would remove the moved files by principal they'd be gone from the source cache drive. Anyway I've moved onto a newer system now of splitting my cache drives up so I keep NVMe for appdata & VM's etc and other new folders. Then for my 'data' share i.e plex & media downloads I'm using several 2.5" SSD's in a zfs pool so 4x 2TB drives in a z1 pool gives 2TB parity & 6TB usable which is plenty of space before mover has to run. Mover tuning moves files over 90days old to the array if the pool is over 70% full. This seems to work well. Edited January 11 by dopeytree Quote
foo_fighter Posted January 12 Posted January 12 In my opinion, the best way of doing this is to use ZFS replication from a cache pool to another ZFS disk in the array or a ZFS pool. There is a sanoid/syncoid video for this: Quote
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.