Save file permissions before backup if possible

PROD-32436

Change-Id: Id679d6d4771dac534ef03d590593603d73919e47
diff --git a/backupninja-backup-pipeline.groovy b/backupninja-backup-pipeline.groovy
index 0ec6409..d17457d 100644
--- a/backupninja-backup-pipeline.groovy
+++ b/backupninja-backup-pipeline.groovy
@@ -88,6 +88,11 @@
             [backupServer, backupMasterSource, backupMinionSource].unique().each {
                 salt.cmdRun(pepperEnv, backupNode, "ssh-keygen -F ${it} || ssh-keyscan -H ${it} >> /root/.ssh/known_hosts")
             }
+            def maasNodes = salt.getMinions(pepperEnv, 'I@maas:region')
+            if (!maasNodes.isEmpty()) {
+                common.infoMsg("Trying to save maas file permissions on ${maasNodes} if possible")
+                salt.cmdRun(pepperEnv, 'I@maas:region', 'which getfacl && getfacl -pR /var/lib/maas/ > /var/lib/maas/file_permissions.txt || true')
+            }
         }
         stage('Backup') {
             def output = salt.getReturnValues(salt.cmdRun(pepperEnv, backupNode, "su root -c 'backupninja --now -d'")).readLines()[-2]