Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Management command to sync environment data.

Syncs database and media, for example when deploying an acceptance environment.

Quick Start

  • pip install django-datasync

  • add ‘datasync’ to INSTALLED APPS

  • configure settings

DATASYNC = {
    'HOST': '{{ remote_host_address }}',
    'PORT': {{ remote_ssh_port }}
    'USER': '{{ remote_username }}',
    'PASSWORD': '{{ remote_user_password }}',
    'MEDIA_REMOTE': '{{ remote_media_directory }}',
    'MEDIA_TARGET': '{{ local_media_directory }}',
    'DATABASE': {
        'HOST': '{{ db_host_address }}',
        'USER': '{{ db_username }}',
        'PASSWORD': '{{ db_password }}',
        'NAME': '{{ db_name }}',
        'PORT': {{ db_port }}
    },
}

You will now have access to the management command ‘sync_environment’. Run that command from the target machine, perhaps as a cron job. Or add to ansible-playbooks setup.

Supported databases: PostgreSQL.

You will also have to edit the following postgres conf files in order to allow access from your target machine(s)

/etc/postgresql/[version]/main/pg_hba.conf

/etc/postgresql/[version]/main/postgres.conf

More information to be found in the PostgreSQL documentation.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-datasync-0.0.2.dev0.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file django-datasync-0.0.2.dev0.tar.gz.

File metadata

File hashes

Hashes for django-datasync-0.0.2.dev0.tar.gz
Algorithm Hash digest
SHA256 dcbe8e0e5381180846d01fc98057303aea33826afcfa74f1f01dd2906a9d6a4e
MD5 b1afd375dc9a8fa0cee90c5473a1291c
BLAKE2b-256 db3731580de19c5696cf4b1a43fbd84f5348975168f4c8b030812b6c8cf7b6af

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.2.dev0 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page