Note: Because this is my personal cheat sheet, I'm installing a few PHP modules that you may not need if you're not running SilverStripe 4.x.x. Otherwise this is a pretty standard and secure LAMP installation.
Log into the remote machine as root: ssh root@123.45.67.890
First, add the admin user.
TFM https://linux.die.net/man/1/rsync
$rsync -av --progress /folder/to/backup/* /destination/of/backup/
To log results add the log flag
Create a new folder to store certs and keys:
- First create a timestamp that looks something like (YearMonthDay-Hour:Minute:Second) or (20200512-02:30:00). This will give you a unique identifier.
- Then cd into the directory you want to back up.
- Create a tar.bz2 (bzip2 compression) file.
- Optionally, delet the original files.
Example:
NewerOlder