## On the server
1. Install `s3cmd`. The process will depend on your server OS. For Debian/Ubuntu the process should just be `apt-get install s3cmd`. For Redhat/Centos you will need to first add the Epel Repository and then run `yum install s3cmd`.
2. Grab the example `.s3cfg` file.
```
wget -O "$HOME/.s3cfg" https://raw.githubusercontent.com/greyhoundforty/COSTooling/master/s3cfg
```
3. Update the configuration file. You will need to update the following lines:
- Line 2: Replace `cos_access_key` with your Cloud Object Storage Access Key
- Line 30 and 31: Replace `cos_endpoint` with the COS endpoint you want to use. For example for the US-Geo region you can use `s3-api.us-geo.objectstorage.softlayer.net`
- Line 55: Replace `cos_secret_key` with your Cloud Object Storage Secret Key
4. Create a replication directory
```
mkdir /backup
```
5. Create the replication script. Replication scripts are stored in the `/usr/sbin/r1soft/bin/scripts/` directory. Create a file called `icos.sh` and paste in the following
```
#!/usr/bin/env
now=$(date "+%F-%H")
$(which tar) -czvf "$HOME/${now}.backup.tar.gz" /backup
$(which s3cmd) -c /root/.s3cfg put "$HOME/${now}.backup.tar.gz" s3://YOUR_REPLICATION_BUCKET
```
*Replace YOUR_REPLICATION_BUCKET with the name of the Cloud Object Storage container you want to store the replicated volumes in.*
6. Make the script executable: `chmod +x icos.sh`
## In the Server Backup Manager admin console
1. Edit the Volume
![](https://dsc.cloud/quickshare/step1EditVolumev2.png)
2. Click on the Replication tab. From the first drop down select Local Replication. Set the replication path to `/backup` and under Replication Action choose `Execute Script`. Choose `icos.sh` from the Replication Script dropdown and then click Save.
![](https://dsc.cloud/quickshare/ste2ChooseLocalReplication.png)
3. Edit the backup policy to perform replication after a backup completes. This is found under the Scheduling section:
![](https://dsc.cloud/quickshare/step3EditBackupPolicy.png)
## Pulling data back to the Server Backup Manager
You can use the `s3cmd` utility to pull the replicated volumes back to the server.
```
s3cmd get s3://YOUR_REPLICATION_BUCKET/replicated_volume.tar.gz
```