Forum Discussion

dp_nash's avatar
dp_nash
Level 3
15 years ago

Default Netbackup behaviour



For Unix clients, NBU, by default checks for a change in 'mtime' attribute only to include a file in incremental backups. What if only the permissions of a file is changed ? Does this mean, NBU does not backup the default access permissions of a file (since ctime is not checked). I know this can be forced through a directive in bp.conf, but how is the default behviour ?

How is this handled in NDMP servers like Netapp/Celerra ? Do they have a bp.conf file as well ? If not how is the inclusion of files for incremental backups handled ?

dp_nash

  • First, NetApps do not have bp.conf files.  NDMP is basically equivalent to a Unix dump command and you can look at /etc/dumpdates on a NetApp filer to see the dates and the dump levels.

    Secondly, for mtime vs ctime, check the Administration Guide for Unix, volume 1 and search for mtime - you'll see a good writeup of what happens.  In short, if a file's permission is changed, it is not normally backed up.  Yes, this means that if you restore a file from the last full 6 days ago, it's possible that its permission was changed 3 days ago but not reflected in recent backups. 

    There are tradeoffs involved here.  If you change permission on a 100GB file, do you want the whole file backed up?  There's isn't an option to just back up the file headers and not the contents of the data.  It also gets interesting if a file is moved from one directory or another or if an entire directory tree is moved.

  • To expand on my earlier comment, NetBackup has support for NDMP environment variables and these are documented in two places:
    1. the NetBackup NDMP Administration guide
    2. The NetApp Tape Backup and Recovery Guide

    NDMP envrionment variables are vendor specific and it's quite likely that EMC does stuff differently than NetApp.  We use NetApps here so I'll comment on their implementation.

    In the NetApp guide, it shows support for the IGNORE_CTIME environment variable (default is N).  The description for this is:

    Specifies that a file is not incrementally backed up if
    only its ctime value has changed since the previous
    incremental backup. Some applications, such as virus
    scanning software, change the ctime value of a file
    within the inode, even though the file or its attributes
    have not changed. As a result, an incremental backup
    might back up files which have not changed. The
    IGNORE_CTIME variable should be specified only if
    incremental backups are taking an unacceptable amount
    of time or space because the ctime value was modified.

    So this is backwards from the NetBackup default - ctimes are the default for NetApp NDMP whereas mtime is the default for NetBackup.


  • Ed,

    So Netapp (by default) is configured to backup all files with a changed 'ctime'. On the first full backup of files on Netapp filer, the ctime of all the files are changed. Hence the next day, although we specify incremental backup, due to the changed ctime all files are backed up and so on. Effectively, Netapp filer does not understand incremental backups(i.e full is the same as incremental). This is assuming we opt to use filesystem based backup utilities like TAR on Netapp.

    In case of DUMP, (which does not affect the 'ctime' as it walks the inode table), incremental backups (in the form of level backup) is possible. However, this will only backup the blocks assocaited with modified files and not files as such.

    Is this understanding correct ?

    Is TAR used as a NDMP backup method in Netapp (in addition to Dump) ? I know it is supported on Celerra.

    dp_nash

  • By enabling the 'IGNORE_CTIME' directive on Netapp filer, we can achieve the file level incremental backups. Hope this is correct ?
  • The statement "Effectively, Netapp filer does not understand incremental backups(i.e full is the same as incremental). "  is simply false. 

    If your goal is to restore a file system to the way it was before, then NetApp's default approach is the right one and NetBackup's default is wrong.   Many people think of an incremental as "back up anything that has changed since the last full".  NetBackup doesn't do this by default - the file system has changed but nothing got backed up.  It's based on file contents, not file metadata.  NetApp includes file metadata as a trigger.

    Imagine this scenario.
    1.  You run a full backup
    2.  You change permission on one file but don't do anything else on the file system
    3.  You run an incremental.  NetBackup backs up nothing.  NetApp'sNDMP backs up the single file.
    4.  You destroy the file system
    5.  You restore the entire file system.

    NetBackup gets you to the point of your last full but does not reflect the changed file since then.  NetApp's NDMP gets you to the point of your last incremental which backed up only the changes made since the last full.

    It's your choice as to which scenario you want and this depends on how your applications work and what your recovery requirements are.