Hallo, mmbackup offers -P to specify an own policy. Unfortunately I cannot seem to find documentation how that policy has to look like. I mean, if I grab the policy generated automatically by mmbackup it looks like this: --------------------------------------------------------- /* Auto-generated GPFS policy rules file * Generated on Sat May 29 15:10:46 2021 */ /* Server rules for backup server 1 *** back5_2 *** */ RULE EXTERNAL LIST 'mmbackup.1.back5_2' EXEC '/net/gpfso/fs1/.mmbackupCfg/BAexecScript.gpfsofs1' OPTS '"/net/gpfso/fs1/.mmbackupShadow.1.back5_2.filesys.update" "-servername=back5_2" "-auditlogname=/net/gpfso/fs1/mmbackup.audit.gpfsofs1.back5_2" "NONE"' RULE 'BackupRule' LIST 'mmbackup.1.back5_2' DIRECTORIES_PLUS SHOW(VARCHAR(MODIFICATION_TIME) || ' ' || VARCHAR(CHANGE_TIME) || ' ' || VARCHAR(FILE_SIZE) || ' ' || VARCHAR(FILESET_NAME) || ' ' || 'resdnt' ) WHERE ( NOT ( (PATH_NAME LIKE '/%/.mmbackup%') OR (PATH_NAME LIKE '/%/.mmLockDir' AND MODE LIKE 'd%') OR (PATH_NAME LIKE '/%/.mmLockDir/%') OR (MODE LIKE 's%') ) ) AND (MISC_ATTRIBUTES LIKE '%u%') AND ... --------------------------------------------------------- If I want use an own policy what of all that is required for mmbackup to find the information it needs? Uli -- 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
Hi Dr. Martin, You can refer to the Administrator Guide > Chapter 30 > Policies for automating file management, or access via the link below. If you downloaded a PDF, it starts with page 487. https://www.ibm.com/docs/en/spectrum-scale/5.1.0?topic=management-policy-rul... There a quite a number of examples in that chapter too which can help you establish a good understanding of how to write one yourself. On Wed, Jun 23, 2021 at 6:10 PM Ulrich Sibiller < u.sibiller@science-computing.de> wrote:
Hallo,
mmbackup offers -P to specify an own policy. Unfortunately I cannot seem to find documentation how that policy has to look like.
I mean, if I grab the policy generated automatically by mmbackup it looks like this:
--------------------------------------------------------- /* Auto-generated GPFS policy rules file * Generated on Sat May 29 15:10:46 2021 */
/* Server rules for backup server 1 *** back5_2 *** */ RULE EXTERNAL LIST 'mmbackup.1.back5_2' EXEC '/net/gpfso/fs1/.mmbackupCfg/BAexecScript.gpfsofs1' OPTS '"/net/gpfso/fs1/.mmbackupShadow.1.back5_2.filesys.update" "-servername=back5_2" "-auditlogname=/net/gpfso/fs1/mmbackup.audit.gpfsofs1.back5_2" "NONE"' RULE 'BackupRule' LIST 'mmbackup.1.back5_2' DIRECTORIES_PLUS SHOW(VARCHAR(MODIFICATION_TIME) || ' ' || VARCHAR(CHANGE_TIME) || ' ' || VARCHAR(FILE_SIZE) || ' ' || VARCHAR(FILESET_NAME) || ' ' || 'resdnt' ) WHERE ( NOT ( (PATH_NAME LIKE '/%/.mmbackup%') OR (PATH_NAME LIKE '/%/.mmLockDir' AND MODE LIKE 'd%') OR (PATH_NAME LIKE '/%/.mmLockDir/%') OR (MODE LIKE 's%') ) ) AND (MISC_ATTRIBUTES LIKE '%u%') AND ... ---------------------------------------------------------
If I want use an own policy what of all that is required for mmbackup to find the information it needs?
Uli -- 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
-- Best regards *T.A. Yeep*
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
On 6/23/21 11:52 PM, Wayne Sawdon wrote:
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?
The current situation is that a customer insists on using different management classes on the TSM server for big files than for small files. We have setup additional server stanzas <backupserver>_big and <backupserver>_small representing the management classes. servername <backupserver>_small ... inclexcl .../dsm.inclexcl.small ... # cat .../dsm.inclexcl.small include ... smallfile ("smallfile" is the management class) Now we need to run mmbackup against the <backupserver>_small and restrict ist to only treat the small files and ignore the bigger ones. As we cannot determine them by name or path we need to use a policy (.. WHERE KB_ALLOCATED < something)
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.
Exactly. I am aware of that.
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.
That's just what I wanted to express with my previous mails. It is not as simple as it seems AND it is not documented. We want to use all that fancy shadow file management that mmbackup comes with because it is sophisticated nowadays and generally works flawlessly. We do not want to reinvent the mmbackup wheel. So for the current situation having a simple way to (partly) replace the WHERE clause would be of great help. I acknowledge that offering that in a general way could get complicated for the developers. Having a documentation how to write a policy that matches what mmbackup without -P is doing is the first step the improve the situation. My posted policy currently works but it is questionable how long that will be the case. Once mmbackup changes its internal behaviour it will break.. Uli -- 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
On 6/23/21 1:08 PM, T.A. Yeep wrote:
You can refer to the Administrator Guide > Chapter 30 > Policies for automating file management, or access via the link below. If you downloaded a PDF, it starts with page 487. https://www.ibm.com/docs/en/spectrum-scale/5.1.0?topic=management-policy-rul... <https://www.ibm.com/docs/en/spectrum-scale/5.1.0?topic=management-policy-rul...>
There a quite a number of examples in that chapter too which can help you establish a good understanding of how to write one yourself.
Thanks, I know how to write policies. I just had the impression that regarding mmbackup the policy has to follow certain rules to satisfy mmbackup requirements. Kind regards, Uli -- 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
participants (4)
-
Frederick Stock -
T.A. Yeep -
Ulrich Sibiller -
Wayne Sawdon
