IBM Support

How To: Use find with mtime for incremental backup by filename

How To


Summary

The backup command will backup incrementally by inode (-u). You can use the 'find' command to select files modified within a specified time.

Objective

A system backup and restore plan exceeds the scope of this document, which only describes how to create an incremental backup by file name.

Steps

For example:

1) Create three files with different creation dates.

# touch -t 202103200930 /test/m1
# touch -t 202103190930 /test/m2
# touch -t 202103180930 /test/m3     

2) Backup all files for a base backup:

(Some backup messages are omitted for simplification.)

# find /test -print |backup -ivf /tmp/test.base.bac
a 0 /test
a 0 /test/m1
a 0 /test/m2
a 0 /test/m3

3) Next, backup only file modified in last day:

# find /test -mtime -1 -print |backup -ivf /tmp/test.m1.bak
a 0 /test
a 0 /test/m1                  

* An example of a backup of the last 2 day's modifications:

# find /test -mtime -2 -print |backup -ivf /tmp/test.m2.bak
a 0 /test
a 0 /test/m1
a 0 /test/m2

*An example of a backup of the last 3 day's modifications:

# find /test -mtime -3 -print |backup -ivf /tmp/test.m3.bak
 
a 0 /test
a 0 /test/m1
a 0 /test/m2
a 0 /test/m3

4) Use the incremental backups as needed in your system restore planning.

Additional Information

SUPPORT

If you require more assistance, use the following step-by-step instructions to contact IBM to open a case for software with an active and valid support contract.  

1. Document (or collect screen captures of) all symptoms, errors, and messages related to your issue.

2. Capture any logs or data relevant to the situation.

3. Contact IBM to open a case:

   -For electronic support, see the IBM Support Community:
     https://www.ibm.com/mysupport
   -If you require telephone support, see the web page:
      https://www.ibm.com/planetwide/

4. Provide a clear, concise description of the issue.

 - For guidance, see: Working with IBM AIX Support: Describing the problem.

5. If the system is accessible, collect a system snap, and upload all of the details and data for your case.

 - For guidance, see: Working with IBM AIX Support: Collecting snap data

[{"Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m0z000000cvyjAAA","label":"Install->mksysb\/backups"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"}]

Document Information

Modified date:
20 March 2021

UID

ibm16434561