Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

How to send ucs file (Archiving) to e-mail by cmd in bigip-os?

How to send ucs file or something for attaching it by e-mail and use cmd in bigip-os (linux 2.4&2.6)? normally in common linux I use mutt utility to send file by email but in bigip-os, it didn't be install.

please help me 
0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Hi Thuchapon,

Do you want to back up the LTM configuration to a UCS file and email that file off to a remote host? If so, which LTM version(s) are you running?

sol914: Displaying the software version of your F5 product
http://support.f5.com/kb/en-us/solutions/public/0000/900/sol914.html

Aaron
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Do you want to back up the LTM configuration to a UCS file and email that file off to a remote host?
yes
If so, which LTM version(s) are you running?
9.3.1 & 10.1.0
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
I used  SOL8430  http://support.f5.com/kb/en-us/solu...r=14949594 to backup ucs file (crontab) but I don't have a way of sending the file by email for attachment. 


please helpppp meeee    

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
I can do it now, use this script below,

(printf "%s\n" "Subject: test" "To: mail@mail.com" "Content-Type: application/ucs" \
"Content-Disposition: attachment; filename=bigip2.ucs" \
"Content-Transfer-Encoding: base64" ""; base64 /var/ucs/bigip2.ucs) | sendmail mail@mail.com
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Nice work in figuring that out. If you have the full script you're using you could post it here or to the Codeshare:

http://devcentral.f5.com/wiki/default.aspx/AdvDesignConfig/codeshare

Aaron
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
hi hoolio

Now I found some problem about crontab, it don't send email for my expect.
my crontab code is;

*/2 * * * * /etc/uob/uob.sh ;I want to run this script every 2 minutes and it don't send anything.

but when I run this script manually, it work.

please help me
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

As hopefully a helpful addition/variation, here's a modified version that allows you to mail a csv attachment from the command line:

echo -e "Subject: test\nTo: mail@mail.com\nContent-Type: text/csv\nContent-Disposition: attachment; filename=test.csv\ncat test.csv" | sendmail mail@mail.com

I've included an image of it as the website is reading the enclosing back quotes (not sure what they are called) as preformatted code.

Image Text

Still need to test this out in a script/cronjob

0