Introduction
This page is specific to S3 remote types (eg acacia and AWS) it does not apply to the more specialised banksia service. If you need more sophisticated policies and lifecycles, you can use the generated ones shown here as a starting point but will have to use awscli to add any customisations. Please refer to Acacia access and identities and Using policies for more details.
Setup
An acacia project can be added to your list of pshell remotes by using an arbitrary remote name (eg project123) and supplying the access/secret pair after you select the remote and login. After this, the usual file and folder commands will be available.
Expand |
---|
|
Code Block |
---|
pshell:/> remote add project123 s3 https://projects.pawsey.org.au
pshell:/> remote project123
project123:/>login
Access: xyz
Secret: *** |
|
...
Expand |
---|
|
Panel |
---|
title | Example 1 - enable multi-part and expired version cleanup after 30 days |
---|
|
Code Block |
---|
pshell> lifecycle my-bucket +mv |
|
Panel |
---|
title | Example 2 - clean up incomplete multi-part uploads after 7 days |
---|
|
Code Block |
---|
pshell> lifecycle my-bucket +m 7 |
|
Panel |
---|
title | Example 3 - turn on versioning and delete expired non-current objects after 30 days |
---|
|
Code Block |
---|
pshell> lifecycle my-bucket +v 30 |
|
If versioning is enabled on a bucket, then you will have the option to review and restore deleted objects in the window before the lifecycle cleanup policy permanently removes them. Panel |
---|
title | Example 4 - Reviewing deleted objects |
---|
|
Code Block |
---|
pshell> lifecycle my-bucket --review |
|
Reviewing deletions: bucket=my-bucket, prefix= |
|
Panel |
---|
title | Example 5 - Restoring an object |
---|
|
Code Block |
---|
pshell> lifecycle my-bucket/folder1 |
| /my_file.txt
Restoring deletions: bucket=my-bucket, prefix=folder1 |
| /my_file.txt
restoring: folder1/my_file.txt |
|
|