cancel
Showing results for 
Search instead for 
Did you mean: 
Create a Post
Ankur_Datta
Nickel

automating mds backup

Hi all,

 

I am writing a script to automate mds backup. 

will running mds_backup with -b parameter will create any problems?

 

we are planning to run this script in midnight when nobody is login into management. for precaution measures, we will enable the setting to log out user from smart console after specific idle time-out.

 

Kindly also let me know if any suggestions please.

 

Thanks

0 Kudos
5 Replies
Danny
Pearl

Re: automating mds backup

No need for a script, a simple one-liner is enough. I'm using the -b parameter all the time without any issues.
Just enter this line into the GAiA job scheduler and have it executed at midnight:

. /opt/CPshrd-R??/tmp/.CPprofile.sh; mdsstop; sleep 120; /opt/CPmds-R??/scripts/mds_backup -l -b -d /var/log/mdsbackups/ 2>/dev/null; sleep 120; mdsstart -s

Manually create the folder /var/log/mdsbackups and use another one-liner to clean up the number of mds_backups in it:

ls -tl /var/log/mdsbackups/*.tgz | tail -n +10 | xargs rm -f

Additional info: How to reduce the size of mds_backup file (sk103115)

 

Highlighted
S_E_
Nickel

Re: automating mds backup

hi

is there any specific reason to run a mdsstop /mdsstart ?

This might be very time consuming until every process is back and has potential to loose logs.

 

We run this one and did not experience any issue:

mds_backup -g -b -L best

 

Regards

 

0 Kudos

Re: automating mds backup

Why don't you run Gaia backup that would include everything? 🙂 Nothing to write. Works out of the box and fully supported.
Danny
Pearl

Re: automating mds backup

Of course Gaia backup is also recommended. However, that‘s another backup option the thread starter didn‘t ask for.

0 Kudos

Re: automating mds backup

I've noticed over the years that some people didn't know that Gaia does full MDS backup 🙂 that's all
0 Kudos