Download database for use in development

Posted . Visible to the public.

When you first check out a development project (or come back to it after some time away) you may want to use a copy of the production site database as a basis for your development database so that your data reflects real data.

C66 with managed backups:

Databases are backed up automatically and can be viewed and downloaded using the cx backups cli:

  1. cx backups list -s [Stack Name] -e production to list backups
  2. cx backups download -s [Stack Name] -e production [Backup ID]

C66 with unmanaged backups

Database are backed up to the database server in /var/cloud66/backups and can be downloaded using the cx download cli:

  1. cx ssh -s [Stack Name] -e production --server [DB Server Name]
  2. Find the tar file you want to download somewhere in /var/cloud66/backups
  3. exit the ssh connection
  4. cx download -s [Stack Name] -e production --server [DB Server Name] [Full Path to Tar File] ~/Downloads/
adre
Last edit
adre
Posted by adre to Foxsoft (2017-07-07 10:30)