There is an SSPak that does exactly what you are describing: secure assets like tgz and dump Database.
It can also push a dump on an external server.
You can install it with curl:
curl -sS https://silverstripe.imtqy.com/sspak/install | php -- /usr/local/bin
and then, for example, mileage
sspak save /var/www /tmp/site.sspak
or capture data from a remote server, for example
sspak save me@prodserver:/var/www prod-site.sspak
When working remotely, you will need ssh keys, or you will be asked to enter a password a couple of times.
source
share