Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #30138
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python': 0.09; 'executes': 0.09; 'part,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'sep': 0.09; 'subject:script': 0.09; 'subject:using': 0.09; 'url:github': 0.09; 'archive': 0.11; 'subject:python': 0.11; 'suggest': 0.11; 'dump': 0.16; 'empty.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'script.': 0.17; "i'd": 0.22; 'example': 0.23; 'creating': 0.26; 'first.': 0.27; 'header:X -Complaints-To:1': 0.28; 'skip:( 50': 0.29; 'at:': 0.31; 'file': 0.32; 'url:home': 0.33; 'to:addr:python-list': 0.33; 'received:org': 0.36; 'charset:us-ascii': 0.36; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'group,': 0.60; 'subject:Need': 0.61; 'first': 0.61; 'email addr:gmail.com': 0.63; 'dennis': 0.91; 'received:108': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
| Subject | Re: Need to archive a MySQL database using a python script |
| Date | Tue, 25 Sep 2012 21:04:02 -0400 |
| Organization | > Bestiaria Support Staff < |
| References | <3dce14bc-cdec-4bcb-a41d-d5de1ef10bf6@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | adsl-108-68-179-103.dsl.klmzmi.sbcglobal.net |
| X-Newsreader | Forte Agent 3.3/32.846 |
| X-No-Archive | YES |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1389.1348621440.27098.python-list@python.org> (permalink) |
| Lines | 22 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1348621440 news.xs4all.nl 6878 [2001:888:2000:d::a6]:34618 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:30138 |
Show key headers only | View raw
On Tue, 25 Sep 2012 16:17:24 -0700 (PDT), bruceg113355@gmail.com
declaimed the following in gmane.comp.python.general:
> Python Users Group,
>
> I need to archive a MySQL database using a python script.
> I found a good example at: https://gist.github.com/3175221
>
> The following line executes however, the archive file is empty.
>
> os.popen("mysqldump -u %s -p%s -h %s -e --opt -c %s | gzip -c > %s.gz" %
> (user,password,host,database,database+"_"+filestamp))
Well, First start might be to update from the old os.popen to
subprocess.Popen
Then I'd suggest working in pieces... Don't do the pipe/gzip part,
just see if the dump is creating a file first.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Need to archive a MySQL database using a python script bruceg113355@gmail.com - 2012-09-25 16:17 -0700 Re: Need to archive a MySQL database using a python script Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-25 21:04 -0400 Re: Need to archive a MySQL database using a python script Hans Mulder <hansmu@xs4all.nl> - 2012-09-26 13:50 +0200
csiph-web