Hello deputies,
I completed my tests and I confirm that it is possible to split the ZeXtras Backup data between multiple stores...
My test environment:
- Single server infrastructure
- "Original" store: 500gb ext3 Virtual Disk
- "New" store: 500gb ext3 Virtual Disk
- The backup path is a folder in the "Original" store.
The ZeXtras Backup Store:
As you can see HERE the actual Items are stored in the items/ folder, splitted in subfolders named after the first two characters of the hash of the item. Those subfolders are owned by the zimbra user and created by ZeXtras Backup at run-time as soon as the folder itself is needed (permissions: 750).
Splitting the Backup Store:
The most difficult part is actually selecting how to manage the Split Store, as two options are possible:
- Preemptive Split: Creating half of the folders in another store (mins that splitting half of the folders on another store does not guarantee that the size of the data will be equally split between the stores)
- Manual Split: Splitting the current data between the stores depending on the size of the folders and repeating the operation ad libitum as the size of the data grows.
Both options are equally viable, depending on personal preferences and needs - the first option is more of a "apply and forget" approach while the second requires some maintenance but will provide a better distribution of the data.
The Split:
After deciding how to manage the split, you need to perform the following operations in order to implement the split:
- Prepare the new store according to your needs (size, filesystem, settings... Just make sure that the file system is Case Sensitive)
- Create the folders you need on the new store.
- Mount the new store to a non-related position
- Stop the Real Time Scanner.
- Move the current data in the existing folders from the original store to the new one.
- Make the folders on the new store visible as if those were in the original store:
I achieved this using the "bind" option of mount:
E.g.: the original store is in /opt/zimbra/backup/zextras/, the new store is in /zextras2 and It contains 2 folders: /zextras2/Aa and /zextras2/Bb. To make the Aa and Bb folders appear as subfolders of /opt/zimbra/backup/zextras/items/ I used the following commands
Code:
mount -o bind /zextras2/Aa /opt/zimbra/backup/zextras/items/Aa
mount -o bind /zextras2/Bb /opt/zimbra/backup/zextras/items/Bb
If everything is ok, you should see the following lines in the output of the "mount" command
Code:
/zextras2/Aa on /opt/zimbra/backup/zextras/items/Aa type none (rw,bind)
/zextras2/Bb on /opt/zimbra/backup/zextras/items/Bb type none (rw,bind)
You can automate the mount procedure by adding the appropriate lines to the /etc/fstab file or through a startup script.
(The use of Bind Mounts is just one of the possible solutions, and while other solutions can be easier to manage this is the most "standard compliant" one.)
Once the folders are set up according to your preference, simply enable the Real Time Scanner and you are good to go.
Have a nice day,
Cine
Bookmarks