markdown R1soft Server备份管理器和IBM Cloud Object Storage的简单复制指南

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown R1soft Server备份管理器和IBM Cloud Object Storage的简单复制指南相关的知识,希望对你有一定的参考价值。

## 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
 ```
  
  

以上是关于markdown R1soft Server备份管理器和IBM Cloud Object Storage的简单复制指南的主要内容,如果未能解决你的问题,请参考以下文章

是否可以在 Github Pages 上托管交互式 R Markdown 文件?

[Markdown]Markdown语法知识(备份)

markdown MongoDB的备份

markdown 从备份还原Sublime设置

markdown 备份virtualBox

markdown Atom:备份所有设置