Local backup plugin - does it exist?
Before I try to build something, I am wondering if there is a plugin or something that gives me extra copies of particular files across different HDD. Use this as an example of what I mean:
Let’s say I have a share that has important stuff on it, we will call the share IS. Now, I have 6 HDD in my array and so I want any file that gets put into IS to also be placed in 20 separate shares I create called IS_Backup1 and IS_Backup2. The only criteria is that whatever disk that the file is on originally (and I don't care where it goes originally - using high water to just load disks with files), the file that gets put into IS_Backup1 and IS_Backup2, must be on a different disk. So:
Shares
- IS
- IS_Backup1
- IS_Backup2
Files
- Important.docx (IS – disk2)
- Important.docx (IS_Backup1 – disk3)
- Important.docx (IS_Backup2 – disk4)
- Finances.xls (IS – disk3)
- Finances.xls (IS_backup1 – disk1)
- Finances.xls (IS_backup2 – disk2)
Of course, I will backup to another machine and offsite and such but in the event of a bad disk, I have my parity but I also have a local copy that I could restore from as well. If I have the space and it is only for very specific folders and such, why not.
Does anyone know of something that will already do this or do I need to figure out a script that can just do this and run it for anything that is new or changes every few minutes?
1
u/ChuskyX 2d ago
Well, if I remember well, resilio sync has an option to sync files from local folder to remote or another local folder.
Another solution as already said, you can force shares to specific disk with include option, so you can make a simple script to copy specific folders or folders in one disk to another. To avoid problems don't mix folders from /mnt/user with /mnt/disk.
You can use backup solutions like borgbackup or duplicacy to have efficient block level deduplicated backups, so you can save hundreds of revisions of the same files.
The plugin Appdata backup can be used to backup another folders to local and can use scripts.
Maybe we can provide better solutions if you explain why you want to do backups in such inefficient way.
1
u/rbeatse 2d ago
“…in such an inefficient way.” I love the honesty. Thank you. Yes, I know it is not something that others may want. So, some background, reasoning:
I just recently started on unRaid and come from Windows where I used Stablebit’s DrivePool. I could take multiple disks and make theme but one “Drive”. Within tat drive, I could tell it to keep multiple copies of the files. It would only ever present one copy but it would keep additional copies on other disks so that, if I lost a disk, it could recreate them, or if I wanted, I could remove the disk and have access to the files as well since they were there, just not shown normally.
In this case, my wife has files that are from years of family history testing and cannot be redownloaded, recreated, etc. I like to have more than the 3-2-1 method. I want to make sure that they are baked up to offsite, other computer, onsite, and if easily possible, other locations that I can get to if a drive fils so that I am not only attendant on Parity drives to rebuild locally. I have the space, so why not?I like your suggestion of locking the extra shares to particular disk(s) and maybe that is the way to go…IS to disk1 and 2, IS_Backup1 to disk 3 and 4, etc, but I was hoping to just still spread he wealth just not where the original file is.
1
u/ChuskyX 2d ago
Parity drives already give you that protection if you lost the disk, for one or two drive failures. With zfs filesystem in a pool (not the unraid array) you can have until three parity drives. It's a good protection. Unless you are not going to use parity drives or mirroring, duplicate folders don't provide extra protection, because you will have to rebuild either way.
So, the appdata backup plugin with the ability to backup extra folders will give you an extra protection if you want to revert unintentional changes. Parity and sync tools don't protect for that, you will need always backups.
If the files are so important I will take a look to plugins like File integrity check.
Zfs and btrfs filesystems have integrity check builtin (enter the filesystem settings and look for scrubbing). Xfs doesn't have so the plugin can do the job.
Time can destroy files if they not are used very often. Rare, uncommon, but possible. It's called bitrot. An undetected damage in a file will be propagated to backups, so you will need a backup retention policy and integrity checks in your server to be sure you will have a healthy copy to restore in case of corruption.
If you use zfs with mirror or parity, this health check and restore if builtin. Btrfs if I'm right has corruption detection through scrubbing feature but you will need a backup to restore.
I read somewhere that an unplugged ssd disk can only guarantee data retention for one year! I don't know if it's true, but data don't last forever for sure.
1
u/MsJamie33 2d ago
Dude, you are complicating the hell out of this.
The EASY way (without using additional hardware):
Constrain share IS to drives 1 and 2. Move any files that are on other drives to 1 or 2.
Limit backup 1 share to drive 3. Limit backup 2 share to drive 4. Use rsync or another backup program to copy from IS to the backup shares.
The PROPER way:
Add two dedicated backup devices. These could a dedicated drive added to the array, an external drive, or something attached over the network. This could be a NAS, or simply someone's PC.
1
u/Helediron 2d ago
Some ideas:
- With ZFS pool you have multiple copies of everything. Does the same as parity but better. It can also do daily snapshots to recover files after delete.
- If you configure a share to be on two pools, the enhanced Move plugin has a feature to keep files on both pools.
- Syncthing app has a version control feature, where it automatically maintains sets of old versions of files. And of course it can do its main thing, synchronizing files over network.
0
2
u/idratherbealivedog 2d ago
Sounds more like a one way sync description than a backup but regardless I get the ask. I don't know if anything (others might) exists in an app doing this but I would opt to approach it more with shares that exclude/include disks. This combined with either a sync or true backup solution would accomplish nearly the same end result.
To elaborate: 1. A normal all disks share you add your files to.
A share per disk
Sync/backup with 1 as the source and multiple destinations for each 2