Skip to content

Instantly share code, notes, and snippets.

@tensorturtle
Last active November 26, 2021 17:07
Show Gist options
  • Select an option

  • Save tensorturtle/8cd0b01cd018ab091da42390d759c490 to your computer and use it in GitHub Desktop.

Select an option

Save tensorturtle/8cd0b01cd018ab091da42390d759c490 to your computer and use it in GitHub Desktop.
How to Use Naver Cloud Archive Storage for Personal Backups

How to Use Naver Cloud Archive Storage for Personal Backups

Why? Honestly, Naver Cloud doesn't stand out, but its prices are comparable to others, and its location probably means faster speeds for Korea.

Other options:

  • If you only need perpetual storage of small (<2TB), see pcloud,
  • If you only need recent backups, see Backblaze.

See naver cloud documentation at: https://cli.ncloud-docs.com/docs/en/guide-archivestorage

Install OpenStack swift command line utility

sudo apt-get install python-pip
sudo pip install python-swiftclient

Get authentication keys

There are 4 authentication strings that you need to find:

From My Page > Manage Account > Manage Auth Key,

find Access Key ID and Secret Key.

From Console > Archive Storage > Confirm API usage information,

find Domain ID and Project ID.

Authenticate swift CLI

Using the four authentication strings from above, you will need to request a token.

Get this token by inserting the four authentication strings in this long command. Replace the values below (remove brackets!)

swift --os-auth-url https://kr.archive.ncloudstorage.com:5000/v3 --auth-version 3 \
      --os-username {access_key_id} --os-password {secret_key} \
      --os-user-domain-id {domain_id} --os-project-id {project_id} \
      auth

This will return something like:

export OS_STORAGE_URL=https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}
export OS_AUTH_TOKEN={token}

Copy these export statements and run them as commands. This saves them as environment variables, so you don't have to enter this authentication every time.

Upload Files with swift CLI:

View list of containers:

swift list

This will return the names of your containers(buckets). Among them, let's say you're going to use mybackupbucket

Upload files to my_backup_bucket:

swift upload mybackupbucket \
--object-name FOLDER_OF_STUFF/ \
/path/to/local/FOLDER_OF_STUFF/

Note the '/' at the end of both --object-name and local path !

Other Operations

For deleting and other operations, the web GUI console is probably sufficient.

If not, refer to the official documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment