kroko
Dabbler
- Joined
- Mar 9, 2015
- Messages
- 21
Hi,
I have two scripts that rsync'es multiple datasets to remote. One for UNIX one for ACL datasets, as rsync flags should differ.
I could create more general approach using just one script by changing each "associative array" member, it's the way i have set it up (local path and remote path)
to include third parameter denoting permission type
That would flip rsync flags per pair.
But to make it maybe more automated the question:
Is it possible to detect dataset permission type via CLI, given that all dataset absolute paths are known for script, a la
Thanks!
I have two scripts that rsync'es multiple datasets to remote. One for UNIX one for ACL datasets, as rsync flags should differ.
I could create more general approach using just one script by changing each "associative array" member, it's the way i have set it up (local path and remote path)
Code:
# PAIRS OF SOURCES AND DESTINATIONS declare -a BACKUP_PAIRS BACKUP_PAIRS[0]='/mnt/vol/mydataset1/:/remote/blabla/mydataset1' BACKUP_PAIRS[1]='/mnt/vol/mydataset2/:/remote/blabla/mydataset2' BACKUP_PAIRS[2]='/mnt/vol/mydataset3/:/remote/blabla/mydataset3'
to include third parameter denoting permission type
Code:
# PAIRS OF SOURCES AND DESTINATIONS declare -a BACKUP_PAIRS BACKUP_PAIRS[0]='/mnt/vol/mydataset1/:/remote/blabla/mydataset1:1' BACKUP_PAIRS[1]='/mnt/vol/mydataset2/:/remote/blabla/mydataset2:2' BACKUP_PAIRS[2]='/mnt/vol/mydataset3/:/remote/blabla/mydataset3:1'
That would flip rsync flags per pair.
But to make it maybe more automated the question:
Is it possible to detect dataset permission type via CLI, given that all dataset absolute paths are known for script, a la
Code:
whatpermtype /mnt/vol/mydataset1
Thanks!