Skip to content

Tag: cloud

Simple backup using S3 Sync

Given that you have the AWS CLI installed and configured, here are a few examples of syncing directories with S3.

Sync your home directory:
[bash]
aws s3 sync $HOME s3://homeof$USER
[/bash]

E.g. $USER is sil and $HOME is /home/sil, then this will copy all files from /home/sil to bucket homeofsil.

To download the files back to another directory:
[bash]
mkdir $HOME/oldhome
aws s3 sync s3://homeof$USER $HOME/oldhome
[/bash]

More details about S3 Sync in the official documentation.