Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4708538

Browse files
Updated README
1 parent 02acf99 commit 4708538

File tree

1 file changed

+33
-16
lines changed

1 file changed

+33
-16
lines changed

‎README.md‎

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,36 @@
33

44
## What is it?
55

6-
A Python 3 script to __automate the download of SQL backups via a [phpMyAdmin](https://www.phpmyadmin.net/) web interface__.
6+
A Python 3 script to __automate the download of SQL backups via a
7+
[phpMyAdmin](https://www.phpmyadmin.net/) web interface__.
78

8-
This is useful when your web hosting provider does not grant you access the the console (for `mysqldump`) but you want to automate the backup of your database (without having to manually use the browser).
9+
This is useful when your web hosting provider does not grant you access to a console (for `mysqldump`) but
10+
you want to automate the backup of your database (without having to manually use the browser).
911

10-
It has been tested with Python 3.4+ on Linux and Windows and phpMyAdmin 4.3.6, 4.5.4.1 and 4.7.0-dev
12+
It has been tested with Python 3.4+ on Linux and Windows and the following versions of phpMyAdmin:
13+
`4.3.x - 4.8.x, 5.0.0`
1114

12-
_Note_: The web interface of phpMyAdmin may change in the future and break this script. Please file a bug report (including your version of phpMyAdmin) if you encounter this issue.
15+
_Note_: The web interface of phpMyAdmin may change in the future and break this script. Please file a bug report
16+
(including your version of phpMyAdmin) if you encounter this issue.
1317

1418
## Usage
1519

1620
usage: phpmyadmin_sql_backup.py [-h] [-o OUTPUT_DIRECTORY] [-p]
17-
[-e EXCLUDE_DBS]
21+
[-e EXCLUDE_DBS] [-s SERVER_NAME]
1822
[--compression {none,zip,gzip}]
1923
[--basename BASENAME] [--timeout TIMEOUT]
2024
[--overwrite-existing]
2125
[--prefix-format PREFIX_FORMAT] [--dry-run]
26+
[--http-auth HTTP_AUTH]
2227
URL USERNAME PASSWORD
23-
28+
2429
Automates the download of SQL dump backups via a phpMyAdmin web interface.
25-
30+
2631
positional arguments:
2732
URL phpMyAdmin login page url
2833
USERNAME phpMyAdmin login username
2934
PASSWORD phpMyAdmin login password
30-
35+
3136
optional arguments:
3237
-h, --help show this help message and exit
3338
-o OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY
@@ -39,7 +44,8 @@ _Note_: The web interface of phpMyAdmin may change in the future and break this
3944
comma-separated list of database names to exclude from
4045
the dump
4146
-s SERVER_NAME, --server-name SERVER_NAME
42-
mysql server hostname to supply if enabled as field on login page
47+
mysql server hostname to supply if enabled as field on
48+
login page
4349
--compression {none,zip,gzip}
4450
compression method for the output file - must be
4551
supported by the server (default: none)
@@ -56,10 +62,11 @@ _Note_: The web interface of phpMyAdmin may change in the future and break this
5662
format. Must be used with --prepend-date to be in
5763
effect
5864
--dry-run dry run, do not actually download any file
59-
--http-auth Basic http authentication, using format
65+
--http-auth HTTP_AUTH
66+
Basic HTTP authentication, using format
6067
"username:password"
61-
62-
Written by Christoph Haunschmidt, version: 2016年03月12日.3
68+
69+
Written by Christoph Haunschmidt et al., version: 2019年05月07日.1
6370

6471
### Examples
6572

@@ -71,12 +78,17 @@ Downloads a plain text `.sql` backup of all databases to the current working dir
7178

7279
phpmyadmin_sql_backup.py "http://www.example.com/phpmyadmin/" your_user your_password --exclude-dbs mydb2,mydb4 --prepend-date --basename example_dump --output-directory /tmp --compression zip
7380

74-
Downloads a zipped dump with databases `mydb2` & `mydb4` excluded, the base name `example_dump` and a prepended UTC date / time to the directory `/tmp`, e.g. `/tmp/2016-03-11--15-19-04-UTC_example_dump.zip`.
81+
Downloads a zipped dump with databases `mydb2` & `mydb4` excluded, the base name `example_dump` and a prepended
82+
UTC date / time to the directory `/tmp`, e.g. `/tmp/2016-03-11--15-19-04-UTC_example_dump.zip`.
7583

7684
## Requirements
7785

7886
- A [Python 3.4+](https://www.python.org/) installation on your system
79-
- [Grab - python web-scraping framework](http://grablib.org/): Install via `pip install -U Grab` or see the [installation instructions](http://docs.grablib.org/en/latest/usage/installation.html) if you run into problems.
87+
- [Grab - python web-scraping framework](http://grablib.org/): Install via `pip install -U Grab` or see
88+
the [installation instructions](http://docs.grablib.org/en/latest/usage/installation.html) if you run into problems.
89+
90+
__Note for Windows users__: while it is possible to install the requirements natively, it is often easier to use the
91+
[Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10) if you are using Windows 10
8092

8193
## Changelog
8294

@@ -86,6 +98,11 @@ Currently, there is no changelog; the best option at the moment is to read the c
8698

8799
[GNU GPL3](https://www.gnu.org/licenses/gpl-3.0.html)
88100

89-
## Author
101+
## Contributors
90102

91-
- Christoph Haunschmidt
103+
- Christoph Haunschmidt (original author)
104+
- Jason Harper (optional mysql server hostname)
105+
- Jonas Bengtsson (older frame-based phpMyAdmin support)
106+
- Benoît Courtine (HTTP Auth)
107+
108+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /