-
Notifications
You must be signed in to change notification settings - Fork 0
cadet pull
Shaun Baer edited this page Sep 11, 2020
·
1 revision
Import a Pantheon project database and files from into a local MAMP instance.
Ensure MAMP is running!!
If you receive an error along the lines of "DROP TABLES
failed", your MAMP server is not turned on. Start your server and try again.
In Terminal, run:
$ cd ~
$ curl -O https://raw.githubusercontent.com/pantheon-systems/terminus-installer/master/builds/installer.phar && php installer.phar install
If you do not have a Pantheon Machine token, generate one. Copy the machine token to your clipboard
Authenticate Terminus in Terminal:
$ terminus auth:login --machine-token=[MACHINE_TOKEN_VALUE]
Additionally, generate and/or add an SSH key. This will allow you to easily pull files from a site.
Run cadet pull --init
in the projects root directory (same directory as .projectconfig.js
). This will ask a series of questions and complete configuration.
$ cadet pull [--init] [--force] [-f] [--exclude=EXAMPLE/FILE/PATH]`
cadet pull --init
- The init flag initializes configuration setup. Run this when starting a new project.
- Data is written to
.cadet/local-db.json
and.cadet/panthCreds.json
if you need to update in the future.
cadet pull
- After running this command, you will be given a series of prompts:
- Select the Pantheon environment you wish to pull from (use up down arrows, enter to select)
- Enter
Y
orN
if you wish to pull the database- by default, this will pull a backup created within the past X minutes, where X is the value for
bac_exp
in.cadet/local-db.json
- by default, this will pull a backup created within the past X minutes, where X is the value for
- Enter
Y
orN
if you wish to pull files
cadet pull --force
or cadet pull -f
- The
--force
or-f
flags will force a new database backup to be created and then downloaded, overriding the time based check frombac_exp
in.cadet/local-db.json
cadet pull --exclude=EXAMPLE/FILE/PATH
- You can pass directories or other rsync
exclude
parameters with the--exclude=
argument. Separate excludes with a comma:
$ cadet pull --exclude=example/path/to/dir
$ cadet pull --exclude=example/path/to/dir,another/path