@srjcooldude
You can use scp
to transfer files and database dumps (i.e. SQL files) if SSH is enabled on the current account with your existing provider.
You can tar
the files and transfer the archive over scp
.
For example, if your home directory for one of your sites is:
/home/username/public_html/
You could login via SSH and run:
tar -zcvf mysitename.tar.gz /home/username/public_html
You’d then repeat that for each site, then use scp
to pull them over. To do a recursive transfer, you could use:
scp -r user@currenthost.com:/path/to/tar_files .
If you want to transfer each file one-by-one:
scp user@currenthost.com:/path/to/mysitename.tar.gz .
The .
at the end of the above commands tells scp
to drop the files in the current directory you’re in. You can replace .
with a path on the Droplet too.
As far as backing up the databases, you can do that from the CLI as well:
mysqldump -u dbuser -p dbname > mysitename_db.sql
Where dbuser
is the database username, dbname
is the database name, and the -p
will prompt you to enter in the password for the database. You’d do this for each database, and transfer those files over with scp
as well.
Restoring the databases can be done from the CLI using almost the same command (we just strip dump off the main command).
mysql -u dbuser -p dbname < mysitename_db.sql