From f2bae6faaeccd06c14146f4ced2051df7b64fd34 Mon Sep 17 00:00:00 2001 From: Mike King <2684049+3mkay@users.noreply.github.com> Date: Wed, 13 May 2026 12:09:27 +0100 Subject: [PATCH] Create remote-files command Adds the reverse of the DB download command to grab files only. --- commands/host/remote-files | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 commands/host/remote-files diff --git a/commands/host/remote-files b/commands/host/remote-files new file mode 100644 index 0000000..93c4e60 --- /dev/null +++ b/commands/host/remote-files @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +#ddev-generated +#annertech-ddev + +## Description: Get latest files from live site +## Usage: remote-files +## Example: "ddev remote-files --skip-hooks" + +fail_msg="Couldn't identify provider, please set it with 'ddev dotenv set .ddev/.env.anner --ddev-upstream-provider [upsun|tibus|etc]' or use 'ddev pull' manually." + +if [ -f "${DDEV_APPROOT}/.ddev/.env.anner" ]; then + set -a + source "${DDEV_APPROOT}/.ddev/.env.anner" + set +a + if [[ $DDEV_UPSTREAM_PROVIDER ]]; then + ddev pull $DDEV_UPSTREAM_PROVIDER --skip-db -y $@ + else + echo $fail_msg + fi +else + echo $fail_msg +fi