There was a recent posting on the NetWorker mailing list regarding manual backups and whether they’re incrementals or not. The short answer of course is they’re not. The more challenging answer is whether or not you can actually generate a manual incremental backup.
You may think that as of 7.5 onwards, where the level is expressly ignored for manual backups, that this isn’t possible:
[root@tara ~]# save -l incr -b Default /tmp Client initiated backup.Option '-l' is ignored and backup is performed at level adhoc
After all, in 7.4 and below, if you ran the above command anyway, you wouldn’t have actually got an incremental backup of /tmp anyway – sure, it would have been tagged as an incremental backup, but that’s not the way that non-complete backup is actually generated in NetWorker. You see, NetWorker needs a timestamp to base a non-full backup against. That timestamp is going to be the nsavetime of a previous backup. (For an incremental, it will be the nsavetime of whatever the most recent backup for the saveset was – for differentials, it may vary.)
I’ll walk through an example of getting an incremental manual backup. It will still be tagged in NetWorker as a manual backup (that just is unavoidable these days), but it will at least just be an incremental. To start with, I need a full backup of something. I’ve got a full backup of my /usr/share directory as its own saveset here:
[root@tara ~]# mminfo -q "name=/usr/share" -r volume,level,sumsize,nsavetime volume lvl size save time 800803L4 full 1244 MB 1263844861
Now, in order to be able to run a ‘manual’ incremental backup against this, I need to run save with a -t (for time) option – and the time I use will be 1263844861, which will backup all changes to that directory since the last backup.
So the command becomes:
[root@tara ~]# save -q -LL -t 1263844861 /usr/share 66135:save: NSR directive file (/.nsr) parsed save: /usr/share 251 KB 00:00:20 588 files completed savetime=1263880379
Note there that I haven’t included a level. If I had, even with the “-t” option included, NetWorker would have still generated the warning/error about ignoring the level for client initiated backups. However, I can confirm that it’s effectively an incremental backup by checking mminfo and looking at the sumsize field again:
[root@tara ~]# mminfo -q "name=/usr/share" -r volume,level,sumsize,nsavetime volume lvl size save time 800803L4 full 1244 MB 1263844861 800803L4 manual 251 KB 1263880379
As you can see, we’ve got a full backup, and a subsequent manual backup that is effectively an incremental against the full.
Where is this useful? I wouldn’t imagine that it’s something you should be making use of in normal operations. However, in an emergency, when there’s an upgrade about to be done and you need to walk someone through doing an incremental backup before the upgrade without giving them administrative access to the backup server, this would be the sort of technique that can come in handy.
this is much simpler:
# savefs -s server -l incr /srv/www
as savefs spawns save that does the work just as scheduled backup would.
and if you attempt incremental backup against a saveset that doesn’t have a definition, it will result in an error:
# savefs -s server -l incr /srv/www/htdocs
or is it listed in this client’s resources