Skip to main content

Sync environment

Project description

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.

Project details


Release history Release notifications

This version
History Node

0.0.2.dev0

History Node

0.0.1.dev0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
django-datasync-0.0.2.dev0.tar.gz (3.2 kB) Copy SHA256 hash SHA256 Source None Jul 31, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page