Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: mysql dump via email...
PostPosted: Fri Jul 22, 2011 12:17 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
Hi...

I use this cron

Quote:
#!/bin/bash

dt=`date +%Y_%m_%d`
/usr/bin/mysqldump -ce --user=username --password=password DBname| gzip | uuencode DATA_dump_$dt.\
sql.gz | mail -s '[Label] Database backup '$dt support@mydomain.org


to schedule a mysqldump and send the dump via email to an email address.
This cron works since years but now it doesn't attach the dump as a file but it sends the scrambled dump in the message body.
Why?

Is it something related to uuencode, if yes what is the problem now?

Running CentOS 6.


Top
   
PostPosted: Fri Jul 22, 2011 12:41 pm 
Offline
Senior Member

Joined: Fri Dec 10, 2010 6:21 am
Posts: 144
sblantipodi wrote:
Hi...

I use this cron

Quote:
#!/bin/bash

dt=`date +%Y_%m_%d`
/usr/bin/mysqldump -ce --user=username --password=password DBname| gzip | uuencode DATA_dump_$dt.\
sql.gz | mail -s '[Label] Database backup '$dt support@mydomain.org


to schedule a mysqldump and send the dump via email to an email address.
This cron works since years but now it doesn't attach the dump as a file but it sends the scrambled dump in the message body.
Why?

Is it something related to uuencode, if yes what is the problem now?

Running CentOS 6.



It looks like the intention of the command is to place the uuencoded data directly in the email body.

I suppose the mail client is supposed to handle the uuencoded data as an attachment (although the modern way of attaching files to email is to use MIME parts).

Have you changed mail client software?


Top
   
 Post subject:
PostPosted: Fri Jul 22, 2011 1:37 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
I don't changed the email client, its thunderbird latest, the strange things is that the script work well on CentOS 5.6.

On centos 5.6 I use dovecot+postfix+amavisd
On centos 6 I use dovecot+postfix


Top
   
 Post subject:
PostPosted: Fri Jul 22, 2011 1:43 pm 
Offline
Senior Member

Joined: Fri Dec 10, 2010 6:21 am
Posts: 144
sblantipodi wrote:
I don't changed the email client, its thunderbird latest, the strange things is that the script work well on CentOS 5.6.

On centos 5.6 I use dovecot+postfix+amavisd
On centos 6 I use dovecot+postfix


If anything I think it could be the "mail" command (mailx?) that behaves differently in centos 6.

What version did you have before and what do you have now?


Can you show the full raw mail contents of an old email and a current one? (at least until the attachment data begins)


Top
   
 Post subject:
PostPosted: Fri Jul 22, 2011 1:49 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
CentOS 6.0 has mailx 12.4
CentOS 5.6 don't want to tell me the version :D


Top
   
 Post subject:
PostPosted: Fri Jul 22, 2011 4:19 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:32 pm
Posts: 737
Location: Italy
ok, just solved using mutt instead of mailx...
bye bye mailx.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group