Re: [Networker] Directive question - include only certain types
2009-09-30 02:19:48
Sorry - one thing - I forgot to mention the obvious on the RUSER/REXEC
option - you'll obviously need to temporarily turn off your directives
on the client to do that style of test...
On 30/09/2009, at 09:12 , Preston de Guise wrote:
On 30/09/2009, at 02:32 , Tim Mooney wrote:
So why don't you change your default directives to use "+null:
*.mp3" etc,
instead of +skip? It sounds like that would be most of what you
want.
Using null would not back up any of the file contents but you would
get index entries for them, so you can easily use nsrinfo to report
on
them.
Testing this out, you'll need to do a bit of work in order to
extract this information.
While the null'd files do show up in nsrinfo output, they don't in
standard nsrinfo output - only the verbose output - and they don't
include full path details, so you'll have to walk the output
extracting paths in advance of any files that match what you've
excluded.
E.g.,
mkdir /testing
cp bigfile /testing
cd /testing
dd if=/dev/zero bs=1024k count=1024 of=test.dat
Create .nsr file in /testing with:
<< . >>
null: test.dat
Run backup:
save /testing
Then:
[root@nox testing]# recover
Current working directory is /testing/
recover> ls
.nsr bigfile
[root@nox testing]# nsrinfo -t `mminfo -q "name=/testing" -r
nsavetime` nox
scanning client `nox' for savetime 1254265148(Wed 30 Sep 2009
08:59:08 AM EST) from the backup namespace
/testing/.nsr
/testing/bigfile
/testing/
/
4 objects found
[root@nox testing]# nsrinfo -t `mminfo -q "name=/testing" -r
nsavetime` -v nox
scanning client `nox' for savetime 1254265148(Wed 30 Sep 2009
08:59:08 AM EST) from the backup namespace
UNIX ASDF v2 file `/testing/.nsr', NSR size=188, fid = 2304.586641,
file size=23
UNIX ASDF v2 file `/testing/bigfile', NSR size=196195024, fid =
2304.97665, file size=196176812
UNIX ASDF v2 file `/testing/', NSR size=244, fid = 2304.97664, file
size=4096
ndirentry->586641 .nsr
ndirentry->97669 test.dat
ndirentry->2 ..
ndirentry->97665 bigfile
UNIX ASDF v2 file `/', NSR size=772, fid = 2304.2, file size=4096
ndirentry->3677476 .vmware/
ndirentry->846145 mnt/
ndirentry->97633 .autorelabel
ndirentry->11 lost+found/
ndirentry->2343169 lib64/
ndirentry->2701153 media/
ndirentry->1985185 opt/
ndirentry->2668609 etc/
ndirentry->1431937 sbin/
ndirentry->4133089 srv/
ndirentry->618337 boot/
ndirentry->97638 .bash_history
ndirentry->1366849 bin/
ndirentry->2766241 selinux/
ndirentry->3417121 tmp/
ndirentry->97644 .autofsck
ndirentry->585793 root/
ndirentry->1692289 lib/
ndirentry->97647 nsr
ndirentry->0 sys/
ndirentry->97648 home
ndirentry->1887553 usr/
ndirentry->2147905 var/
ndirentry->2245537 d/
ndirentry->0 dev/
ndirentry->0 net/
ndirentry->0 misc/
ndirentry->0 proc/
ndirentry->2 ..
ndirentry->97664 testing/
4 objects found
As you can see, the name of the file is only listed in an ndirentry
without path information. Not impossible to overcome, but something
to be aware of.
Alternatively, you can walk the filesystem, but walk it as the
backup user. For example, I've got a client called 'asgard' and a
server called 'nox':
[root@nox testing]# RCMD="save -s nox -n /root"
[root@nox testing]# RUSER=root
[root@nox testing]# export RCMD RUSER
[root@nox testing]# nsrexec -c asgard
Warning: Could not determine job id: Connection timed out.
Continuing ...
/root/.elinks/globhist
/root/.elinks/cookies
/root/.elinks/gotohist
/root/.elinks/
/root/.bash_profile
/root/.tcshrc
/root/aralathan.pub
/root/.my.cnf
/root/anaconda-ks.cfg
/root/nmsql521_win_x86.zip
/root/nw_linux_x86.tar.gz
<snip>
32477:(pid 29247):
save: /root 155 records 32 KB header 855 MB data
save: /root 855 MB estimated
Run that, save the text and then search through. You'll get full
path information that way and not have to parse the results of
nsrinfo or change the backup process.
Cheers,
Preston.
--
Preston de Guise
"Enterprise Systems Backup and Recovery: A Corporate Insurance
Policy":
http://www.amazon.com/Enterprise-Systems-Backup-Recovery-Corporate/dp/1420076396
http://www.enterprisesystemsbackup.com
NetWorker blog: http://nsrd.wordpress.com
--
Preston de Guise
"Enterprise Systems Backup and Recovery: A Corporate Insurance Policy":
http://www.amazon.com/Enterprise-Systems-Backup-Recovery-Corporate/dp/1420076396
http://www.enterprisesystemsbackup.com
NetWorker blog: http://nsrd.wordpress.com
--
Preston de Guise
"Enterprise Systems Backup and Recovery: A Corporate Insurance Policy":
http://www.amazon.com/Enterprise-Systems-Backup-Recovery-Corporate/dp/1420076396
http://www.enterprisesystemsbackup.com
NetWorker blog: http://nsrd.wordpress.com
To sign off this list, send email to listserv AT listserv.temple DOT edu and type
"signoff networker" in the body of the email. Please write to networker-request
AT listserv.temple DOT edu if you have any problems with this list. You can access the
archives at http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER
|
|
|