-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrecall.pol
29 lines (25 loc) · 1004 Bytes
/
recall.pol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* exclude list */
define( exclude_list,
(PATH_NAME LIKE '%/.SpaceMan/%' OR
PATH_NAME LIKE '%/.ltfsee/%' OR
PATH_NAME LIKE '%/.mmSharedTmpDir/%' OR
PATH_NAME LIKE '%.mmbackupCfg/%' OR
PATH_NAME LIKE '%/.snapshots/%' OR
NAME LIKE '.mmbackupShadow%' OR
NAME LIKE 'mmbackup%')
)
/* define is_migrated */
define(is_migrated, (MISC_ATTRIBUTES LIKE '%V%'))
/* list files to be recalled and invoke the recall script */
RULE 'extlist' EXTERNAL LIST 'recall' EXEC '/path-to/recallGlacier.sh'
RULE 'listRec' LIST 'recall' FOR FILESET('buckets') WHERE
NOT (exclude_list) AND
xattr('user.storage_class') = 'GLACIER' AND
is_migrated AND
xattr('user.noobaa.restore.request') IS NOT NULL
/*Invokation:
# mmapplypolicy [path-or-device] -P recall.pol -m [drives-1] -N [archiveNodes] -B [bucket-size] --single-instance
-m number of parallel threads per node, number of drives per node minus 1
-N nodes exuting the policy, archive nodes
-B bucket-size per thread, between 1000 and 20000
*/