terminus
terminus copied to clipboard
Feature request: clear the remote files directory with rm -rf
Hi all,
in the process of moving around environment with tons of client files ( > 15GB ) the SFTP system can take a pretty long time to delete thousands of files .
I would request adding a terminus feature to rm -rf
the files directory in the specified Drupal environment, (or wp-content/uploads for WordPress) which would be a lot faster than having SFTP walk across every directory.
You could try and see if the Terminus Rsync Plugin can do this for you, e.g. if you rsync an empty directory to files with a delete option.
You could also try using terminus drush
or terminus wp
to run some php code with passthru
.
Enhancing env:wipe
to do only files or only the db would be another option, but that can't be done today, whereas the workarounds above should work.
Thanks! I wasn't aware of passthru options. Appreciate the info today.
For posterity:
This will DELETE ALL FILES in the environment you choose.
mkdir emptydir
terminus rsync emptydir SITE.ENV:files -- --delete --recursive --verbose
Using --verbose could be long but at least you know something is happening.
P.S. Hi @HongPong!