Backup cache only share to another share on array


Recommended Posts

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?

Link to comment
  • 2 weeks later...

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?

Link to comment

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 by Divi
  • Like 2
Link to comment

^ 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:

backups1.thumb.PNG.26e5577ec545dfec86f3d18173801635.PNG

 

Example how my Appdata backup script looks:

backups2.thumb.PNG.5ee8413cdc0ca5ba72da5d2231e7a821.PNG

  • Like 2
Link to comment
  • 3 months later...

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!!

Link to comment
  • 1 year later...
  • 4 months later...
  • 1 year later...
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?

Link to comment

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 by dopeytree
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.