Skip to content

Commit

Permalink
s3 object tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Vorobyev committed Dec 6, 2023
1 parent 18e1f33 commit 2788644
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 8 deletions.
16 changes: 8 additions & 8 deletions content/features/s3-object-lock.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ Example `Storage Wizard` screenshot:
The headers are specified in the the format `key:value` divided by a new line. For example:

```
x-amz-object-lock-mode:COMPLIANCE
x-amz-object-lock-retain-until-date:2025-01-01T00:00:00Z
x-amz-object-lock-mode: COMPLIANCE
x-amz-object-lock-retain-until-date: 2025-01-01T00:00:00Z
```

Below is the list of S3 Object Lock related headers:
Expand All @@ -66,7 +66,7 @@ Below is the list of S3 Object Lock related headers:

- Format `yyyy-MM-ddThh:mm:ssZ`. The retain-until-date value must be in the format 2023-04-23T11:28:00Z. Fractional seconds are allowed, but only 3 decimal digits are preserved (milliseconds precision). Other ISO 8601 formats are not allowed.
- The retain-until-date must be in the future.
- [Dynamic values for retain-until-date](#dynamic-values-for-retain-until-date) can be used.
- [Dynamic values for retain-until-date](#dynamic-values-for-headers) can be used.

#### x-amz-object-lock-legal-hold
- Can be `ON` or `OFF` (case-sensitive). If legal hold is `ON`, the object is placed under a legal hold. If legal hold is OFF, no legal hold is placed. Any other value results in a 400 Bad Request (InvalidArgument) error.
Expand All @@ -75,12 +75,12 @@ Below is the list of S3 Object Lock related headers:
#### Content-MD5
- The required `Content-MD5` header is added by Cloudback automatically, no need to specify it manually.

### Dynamic values for retain-until-date
### Dynamic values for headers

Cloudback allows to calculate the value for `x-amz-object-lock-retain-until-date` dynamically using `liquid` templates. Cloudback uses [scriban](https://github.com/scriban/scriban) template engine to render the value of the header. Refer to the examples provided below for guidance. If you require additional scripting functionality, please consult the scriban documentation:
- [Date functions](https://github.com/scriban/scriban/blob/master/doc/builtins.md#binary-operations)
- [Built-in functions](https://github.com/scriban/scriban/tree/master/doc)
- [Documentation](https://github.com/scriban/scriban/tree/master/doc)
Cloudback uses `liquid` templates to dynamically calculate values. The [scriban](https://github.com/scriban) template engine is in use. It evaluates expressions inside braces `{{ }}`. You can see how it works in the examples given below. If you need more scripting options, you can consult the scriban documentation:
- For date functions, visit [here](https://github.com/scriban/scriban/blob/master/doc/builtins.md#binary-operations)
- For a list of built-in functions, check [this link](https://github.com/scriban/scriban/tree/master/doc)
- General documentation can be found [here](https://github.com/scriban/scriban/tree/master/doc)

### Examples of HTTP headers

Expand Down
53 changes: 53 additions & 0 deletions content/features/s3-object-tag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: Amazon S3 Object Tagging
weight: 18
description: Cloudback supports S3 Object Tagging feature for your backups.
keywords: github backup, cloudback, amazon s3 object tag, s3 object tag, object tag, tag, amazon s3, s3, aws s3, s3 bucket, s3 storage, s3 object tag feature
---

# Amazon S3 Object Tagging

[Amazon S3 Object Tagging](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html) is a feature provided by Amazon Web Services in their Simple Storage Service. It's designed to help you to categorize your storage. Cloudback supports S3 Object Tagging feature using custom HTTP headers for the the [PutObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) API call.

## Getting Started

### HTTP headers for S3 Object Tagging

#### x-amz-tagging
The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For example, "Key1=Value1").

Example:
```
x-amz-tagging: Key1=Value1&Key2=Value2
```

### Build-in variables

You can use the following variables in the `x-amz-tagging` header:

- `{{ context.RepositoryName }}`: The name of the repository that is being backed up.
- `{{ context.AccountName }}`: The name of the owner account of the repository that is being backed up.

Example:
```
x-amz-tagging: RepositoryName={{ context.RepositoryName }}&AccountName={{ context.AccountName }}
```

### Storage wizard

Additional HTTP headers are supported for all S3 compatible storages:

- Amazon S3 Bucket: Access Point
- Amazon S3 Bucket: Access Key
- OpenStack Swift Container: S3 API
- Wasabi S3 Bucket: Access Key

Example `Storage Wizard` screenshot:

![Headers](/static/features/s3-custom-headers.png)

## Learn more
- External Article: [Categorizing your storage using tags](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html)
- External Article: [PutObject Request Syntax](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html#API_PutObject_RequestSyntax)
- [Amazon S3 Object Lock](/features/s3-object-lock/)
- [Customer Managed Storages](/features/customer-storages/)
39 changes: 39 additions & 0 deletions content/known-issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: Known Issues
linkTitle: Known Issues
weight: 16
description: The list of Cloudback known issues
keywords: github backup, cloudback, known issues, issues
---

# Cloudback Known Issues

## 'It is required to install out GitHub Application' error occurs right after changing the organization member role to 'Owner'

Prerequisites:
- You have a GitHub organization with at least one non-owner member.
- You have a GitHub Cloudback application installed in your organization.
- Cloudback Dashboard is accessible for the organization owners only.

Steps to reproduce:
- Change the organization member role to 'Owner'.
- Open the Cloudback Dashboard.

Expected result:
- The Cloudback Dashboard is accessible.

Actual result:
- The 'It is required to install out GitHub Application' error occurs.

<p align="center">
<img src="https://github.com/cloudback/docs/blob/master/static/issue1.png?raw=true" alt="It is required to install out GitHub Application error" class="screenshot">
</p>

Root cause:
- GitHub does not send any notification of a role change of the organization member to the GitHub application. Cloudback uses cached data. It is a known issue, confirmed by GitHub Support Team.

Workaround:
- Remove the member from the organization.
- Re-add the member to the organization with Owner role.


Binary file added static/issue1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2788644

Please sign in to comment.