The boto-rsync project works with the S3 object interface in e24files.com. It allows us to easily upload our files to the cloud. It is a very useful solution for backing up, archiving databases and files. The boto-rsync software is very easy to use in your own scripts and programs. Like the Unix rsync tool, it also allows for two-way synchronization and under certain conditions.
Installing the required Python module (on Ubuntu/Debian), if we don’t have Python on the server we can install it with the command:
sudo apt-get install python-pip
Then we install boto-rsync using PiP:
pip install boto_rsync
In the next step, we create a configuration file ~/.boto
and fill it in with the following content:
[Credentials]
aws_access_key_id = Klucz_API_S3_e24files
aws_secret_access_key = Hasło_API_S3_e24files
Having prepared the configuration, we can try to synchronize the contents of the local “test_directory” directory and the remote container in the e24cloud.com infrastructure called “test_container”. To do this, issue the command:
boto-rsync –-endpoint e24files.com test_directory s3://test_container
An example view of the console after issuing the command:
e24@valkyria:~$ boto-rsync –-endpoint e24files.com test_directory/ s3://test_container/
Scanning for files to transfer…
wp_backup_20190708102321.sql.gz
647.0kB of 647.0kB 100% 500.0kB/s 0:00:02