Video Screencast Help

Backup only the Current month directory only

Created: 19 Mar 2013 • Updated: 21 Mar 2013 | 8 comments
This issue has been solved. See solution.

Hi All. 

 

I have mount point like /backup then inside there are directories: 1 2 3 4 5 6 7 8 9 10 11 12 (each directory represent the month). Since the who whole /backup directory is quite huge, I want to backup only the current month, so for example this march I want to backup /backup/3 directory only (or plus a month before /backup/2 for redudancy) . 

Is that any easy way to do that? 

Thank you.

 

Iwan Tamimi

Discussion Filed Under:

Comments 8 CommentsJump to latest comment

Marianne's picture

I cannot think of any easy way...

You will have to manually update the Backup Selection on the 1st of every month.

Else, write a script to update the Backup Selection and use OS tool (e.g. cron on Unix/Linux) to run after midnight on the 1st.

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

SOLUTION
sazz.'s picture

You could just create 12 more policies in the environment naming them Jan,Feb and so on, put selection details as needed for them and do the calender schedule to run them accordingly.

So in March policy you will be selecting /backup/3 and  /backup/2 and do the calender schedule as required.

Iwan Tamimi's picture

Thanks Marianne and sazz for the sugestions.

 

I am interested to test the Marrianne sugestion first, what is the Netbackup  command to change the file list on the policy?

 

Regards,

Iwan

Marianne's picture

Let me look it up in Commands manual... Should start with bppl...

Will be back shortly.

 

**** EDIT ****

bpplinclude.
 

 

bpplinclude policy_name [-v] [-M master_server,...]
 -add pathname ... | -add -f filename | -delete pathname
... | -delete -f filename | -modify old_pathname new_pathname
 
bpplinclude performs one of the following operations:
■ Adds the pathnames to the policy file list
■ Deletes the pathnames from the policy file list
■ Modifies the pathnames in the policy file list
■ Displays the policy file list for a policy
 
See: NetBackup Commands Reference Guide  http://www.symantec.com/docs/DOC3684

 

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

Gavrilov's picture

You're right. But I think it's better to go further. As we know the police is a simple several plan text files:

# cd /usr/openv/netbackup/db/class
# cd <policy_name>
# ls -la
total 24
drw-r-xr-x   3 root     root        1024 Jan 18 17:46 .
drw-r-xr-x 190 root     root        8192 Mar  1 10:07 ..
-rw-------   1 root     root         600 Jan 18 17:46 clients
-rw-------   1 root     root           4 Nov 25  2008 includes
-rw-------   1 root     root         914 Jan 18 17:46 info
drwxr-xr-x   4 root     root          96 Jul 10  2011 schedule
# cat includes
F:\

#

We can create a script which gets list of files from the client and redirects these file names into includes file. 

 

Cheers,

Mike

Iwan Tamimi's picture

Marrianne: thank you, I will use your suggestion, I got some ideas to do it. Thank you very much

Gavrilov: My list is only directory so it is quite simple, I will create one set of include directories

Regards,

Iwan Tamimi

Marianne's picture

Please remember to mark a post as Solution if your query was answered.

This will also help other users with similar queries.

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

Iwan Tamimi's picture

Garilov: btw I just realized the directories mentions has a list of directories currently included, I can use it as a list to be deleted. thank you