Hi Uli,
 
At a higher level what are you trying to do? Include some directories and exclude others? Use a different backup server? What do you need that is not there?
 
mmbackup is tied to Spectrum Protect (formerly known as TSM) and gets its include/excludes from the TSM option files. It constructs a policy to list all of the files & directories and includes attributes such as mtime and ctime. It then compares this list of files to the "shadow database" which is a copy of what the TSM database has. This comparison produces 3 lists of files: new files & files that have the data changed, existing files that only have attributes changed and a list of files that were deleted. Each list is sent to Spectrum Protect to either backup the data, or to update the metadata or to mark the file as deleted. As Spectrum Protect acknowledges the operation on each file, we update the shadow database to keep it current.
 
So writing a new policy file for mmbackup is not really as simple as it seems. I don't  think you can change the record format on the list of files. And don't override the encoding on special characters. And I'm sure there are other Gotchas as well.
 
-Wayne
 
 
----- Original message -----
From: Ulrich Sibiller <u.sibiller@science-computing.de>
Sent by: gpfsug-discuss-bounces@spectrumscale.org
To: gpfsug-discuss@spectrumscale.org
Cc:
Subject: [EXTERNAL] Re: [gpfsug-discuss] mmbackup with own policy
Date: Wed, Jun 23, 2021 10:16 AM
 
On 6/23/21 1:31 PM, Frederick Stock wrote:
> The only requirement for your own backup policy is that it finds the files you want to back up and
> skips those that you do not want to back up.  It is no different than any policy that you would use
> with the GPFS policy engine.

Have you ever sucessfully done this?

Let me explain again:
With an own policy I know what I want to see in the output and for an arbitrary external rule I know
where the called script resides and what parameters it expects.

mmbackup however creates a helper script (BAexecScript.<filesys>) on the fly and calls that from its
autogenerated policy via the external rule line. I assume I need the BAexecScript to make mmbackup
behave like it should. Is this wrong?

Update: after playing around for quite some time it looks the rule must have a special format, as
shown below. Replace the placeholders like this:
<backupserver>   the name of the Backupserver as defined in dsm.sys and on the mmbackup command line
via --tsm-servers
<fsname>         as shown in mmlsfs all_local (without /dev/)
<mountpoint>     as shown in mmlsfs -T

--------------------------------------------------------------------------------------------
RULE EXTERNAL LIST 'mmbackup.1.<backupserver>' EXEC
'<mountpoint>/.mmbackupCfg/BAexecScript.<fsname>' OPTS
'"<mountpoint>/.mmbackupShadow.1.<backupserver>.filesys.update" "-servername=<backupserver>"
"-auditlogname=<mountpoint>/mmbackup.audit.<fsname>.<backupserver>" "NONE"'

RULE 'BackupRule' LIST 'mmbackup.1.<backupserver>' DIRECTORIES_PLUS
      SHOW(VARCHAR(MODIFICATION_TIME) || ' ' || VARCHAR(CHANGE_TIME) || ' ' ||
           VARCHAR(FILE_SIZE)         || ' ' || VARCHAR(FILESET_NAME) ||
           ' ' || 'resdnt' )
   WHERE ( KB_ALLOCATED > 1024 )
--------------------------------------------------------------------------------------------

Call it like this:

/usr/lpp/mmfs/bin/mmbackup  <mountpoint> --tsm-servers <backupserver> -P <policyfile>


As this non-trivial it should be mentioned in the documentation!

Uli

--
Dipl.-Inf. Ulrich Sibiller           science + computing ag
System Administration                    Hagellocher Weg 73
Hotline +49 7071 9457 681          72070 Tuebingen, Germany
                           https://atos.net/de/deutschland/sc 
--
Science + Computing AG
Vorstandsvorsitzender/Chairman of the board of management:
Dr. Martin Matzke
Vorstand/Board of Management:
Matthias Schempp, Sabine Hohenstein
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Philippe Miltin
Aufsichtsrat/Supervisory Board:
Martin Wibbe, Ursula Morgenstern
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196
_______________________________________________
gpfsug-discuss mailing list
gpfsug-discuss at spectrumscale.org
http://gpfsug.org/mailman/listinfo/gpfsug-discuss