cancel
Showing results for 
Search instead for 
Did you mean: 

Backup only the Current month directory only

Iwan_Tamimi
Level 6

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

1 ACCEPTED SOLUTION

Accepted Solutions

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

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.

View solution in original post

8 REPLIES 8

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

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.

sksujeet
Level 6
Partner Accredited Certified

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
Level 6

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
Moderator
Moderator
Partner    VIP    Accredited Certified

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

 

Mike_Gavrilov
Moderator
Moderator
Partner    VIP    Accredited Certified

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. 

 

Iwan_Tamimi
Level 6
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

Iwan_Tamimi
Level 6
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

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

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

This will also help other users with similar queries.