import_export
=============
A package for importing and exporting your SQL database. It is by default configured for MySQL, but you can implement your own export functions without all too much effort.
Quick start
-----------
1. Add 'import_export' to your INSTALLED_APPS setting like this:
```
INSTALLED_APPS = [
...,
'import_export',
'maintenance',
'celery',
'django_celery_beat',
]
```
2. Follow the install guide for the [maintenance](https://github.com/Nigel2392/wagtail-maintenance) package.
3. Follow the install guide for [Celery](https://github.com/celery/celery/).
4. Follow the install guide for [django_celery_beat](https://github.com/celery/django-celery-beat).
Settings
-----------
### MYSQL_DUMP_CONFIG_LOCATION
### MYSQL_DUMP_BINARY
This setting is only for people who stick to defaults and do not implement their own dump functions.
* Important for windows users to set this to where your `mysqldump.exe` is located.
* On unix it will try to execute the plain `mysqldump` binary. Make sure it is in your PATH or set the `MYSQL_DUMP_BINARY` to the full path of the binary.
### DUMP_LOCATION
Where to store the database dumps on the filesystem.
### DUMP_CHUNK_SIZE
### DUMP_GET_TABLES
### DUMP_EXPORT_TABLE
### DUMP_IMPORT_TABLE
### DUMP_MUST_NOT_ENCRYPT
Whether or not the database dump must be encrypted.
When the dump is encrypted it will also be signed.
The signature will be checked when importing the dump.
```python
# Default, do not encrypt the database dump.
# Accept unencrypted dumps.
# Accept encrypted dumps.
DUMP_MUST_NOT_ENCRYPT=True
# Encrypt the database dump.
# Do not accept unencrypted dumps.
DUMP_MUST_NOT_ENCRYPT=False
```
### BACKUP_ROOT
Where to store the backups.
The default is `os.path.join(BASE_DIR, 'backups')`.
### DUMP_EXCLUDED_EXPORT_TABLES
Which tables do you want to exclude from the export?
This will be a list or a tuple, where ending with a * will check for a partial match to the start of the table name.
```python
EXCLUDED_EXPORT_TABLES = getattr(settings, "DUMP_EXCLUDED_EXPORT_TABLES", [
"import_export_*",
"django_*",
"auth_*",
...
] if DUMP_MUST_NOT_ENCRYPT else []) # When encrypting; export everything
```
Raw data
{
"_id": null,
"home_page": "https://github.com/Nigel2392/import_export",
"name": "sql-import-export",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "",
"author": "Nigel",
"author_email": "nigel@goodadvice.it",
"download_url": "https://files.pythonhosted.org/packages/e6/53/106fd4793a264dc04c30bae292ba6915994df31c7e327f31be97cf4830ae/sql_import_export-1.0.3.tar.gz",
"platform": null,
"description": "import_export\r\n=============\r\n\r\nA package for importing and exporting your SQL database. It is by default configured for MySQL, but you can implement your own export functions without all too much effort.\r\n\r\n\r\n\r\nQuick start\r\n-----------\r\n\r\n1. Add 'import_export' to your INSTALLED_APPS setting like this:\r\n\r\n ```\r\n INSTALLED_APPS = [\r\n \t...,\r\n \t'import_export',\r\n \t'maintenance',\r\n \t'celery',\r\n \t'django_celery_beat',\r\n ]\r\n ```\r\n2. Follow the install guide for the [maintenance](https://github.com/Nigel2392/wagtail-maintenance) package.\r\n3. Follow the install guide for [Celery](https://github.com/celery/celery/).\r\n4. Follow the install guide for [django_celery_beat](https://github.com/celery/django-celery-beat).\r\n\r\n\r\nSettings\r\n-----------\r\n\r\n\r\n### MYSQL_DUMP_CONFIG_LOCATION\r\n\r\n\r\n\r\n### MYSQL_DUMP_BINARY\r\n\r\nThis setting is only for people who stick to defaults and do not implement their own dump functions.\r\n\r\n* Important for windows users to set this to where your `mysqldump.exe` is located.\r\n* On unix it will try to execute the plain `mysqldump` binary. Make sure it is in your PATH or set the `MYSQL_DUMP_BINARY` to the full path of the binary.\r\n\r\n\r\n### DUMP_LOCATION\r\n\r\nWhere to store the database dumps on the filesystem.\r\n\r\n### DUMP_CHUNK_SIZE\r\n\r\n\r\n\r\n### DUMP_GET_TABLES\r\n\r\n\r\n\r\n### DUMP_EXPORT_TABLE\r\n\r\n\r\n\r\n### DUMP_IMPORT_TABLE\r\n\r\n\r\n\r\n### DUMP_MUST_NOT_ENCRYPT\r\n\r\nWhether or not the database dump must be encrypted.\r\nWhen the dump is encrypted it will also be signed.\r\nThe signature will be checked when importing the dump.\r\n\r\n```python\r\n# Default, do not encrypt the database dump.\r\n# Accept unencrypted dumps.\r\n# Accept encrypted dumps.\r\nDUMP_MUST_NOT_ENCRYPT=True\r\n\r\n# Encrypt the database dump.\r\n# Do not accept unencrypted dumps.\r\nDUMP_MUST_NOT_ENCRYPT=False\r\n```\r\n\r\n\r\n### BACKUP_ROOT\r\n\r\nWhere to store the backups. \r\nThe default is `os.path.join(BASE_DIR, 'backups')`.\r\n\r\n### DUMP_EXCLUDED_EXPORT_TABLES\r\n\r\nWhich tables do you want to exclude from the export? \r\nThis will be a list or a tuple, where ending with a * will check for a partial match to the start of the table name.\r\n \r\n```python\r\nEXCLUDED_EXPORT_TABLES = getattr(settings, \"DUMP_EXCLUDED_EXPORT_TABLES\", [\r\n \"import_export_*\",\r\n \"django_*\",\r\n \"auth_*\",\r\n ...\r\n] if DUMP_MUST_NOT_ENCRYPT else []) # When encrypting; export everything\r\n```\r\n",
"bugtrack_url": null,
"license": "GPL-3.0-only",
"summary": "An application to import or export your Wagtail site's database.",
"version": "1.0.3",
"project_urls": {
"Homepage": "https://github.com/Nigel2392/import_export"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e653106fd4793a264dc04c30bae292ba6915994df31c7e327f31be97cf4830ae",
"md5": "fcd4daead96be7db06a1974472cceaad",
"sha256": "8dd9d28bd93f765e3da059e8aa7776299d41287c1b0b00bdaa9f926a22d5583f"
},
"downloads": -1,
"filename": "sql_import_export-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "fcd4daead96be7db06a1974472cceaad",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 43180,
"upload_time": "2024-02-29T22:54:00",
"upload_time_iso_8601": "2024-02-29T22:54:00.583529Z",
"url": "https://files.pythonhosted.org/packages/e6/53/106fd4793a264dc04c30bae292ba6915994df31c7e327f31be97cf4830ae/sql_import_export-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-29 22:54:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Nigel2392",
"github_project": "import_export",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "sql-import-export"
}