Project: Velero (Runtime / Cloud Native Storage)
File: storage-layout-reorg-v0.10.md

title: "Object Storage Layout Changes in v0.10" layout: docs Ark v0.10 includes breaking changes to where data is stored in your object storage bucket. You'll need to run a if you're upgrading from prior versions of Ark. Prior to v0.10, Ark stored data in an object storage bucket using the following structure: ``` <your-bucket>/ backup-1/ ark-backup.json backup-1.tar.gz backup-1-logs.gz restore-of-backup-1-logs.gz restore-of-backup-1-results.gz backup-2/ ark-backup.json backup-2.tar.gz backup-2-logs.gz restore-of-backup-2-logs.gz restore-of-backup-2-results.gz ... ``` Ark also stored restic data, if applicable, in a separate object storage bucket, structured as: ``` <your-ark-restic-bucket>/[<your-optional-prefix>/] namespace-1/ data/ index/ keys/ snapshots/ config namespace-2/ data/ index/ keys/ snapshots/ config ... ``` As of v0.10, we've reorganized this layout to provide a cleaner and more extensible directory structure. The new layout looks like: ``` <your-bucket>[/<your-prefix>]/ backups/ backup-1/ ark-backup.json backup-1.tar.gz backup-1-logs.gz backup-2/ ark-backup.json backup-2.tar.gz backup-2-logs.gz ... restores/ restore-of-backup-1/ restore-of-backup-1-logs.gz restore-of-backup-1-results.gz restore-of-backup-2/ restore-of-backup-2-logs.gz restore-of-backup-2-results.gz ... restic/ namespace-1/ data/ index/ keys/ snapshots/ config namespace-2/ data/ index/ keys/ snapshots/ config ... ... ``` Before upgrading to v0.10, you'll need to run a one-time upgrade script to rearrange the contents of your existing Ark bucket(s) to be compatible with the new layout. Please note that the following scripts will not migrate existing restore logs/results into the new `restores/` subdirectory. This means that they will not be accessible using `ark restore describe` or `ark restore logs`. They will remain in the relevant backup's subdirectory so they are manually accessible, and will eventually be garbage-collected along with the backup. We've taken this approach in order to keep the migration scripts simple and less error-prone. This script uses , which you can download and install following the instructions . Please read through the script carefully before starting and execute it step-by-step. ```bash ARK_BUCKET=<your-ark-bucket> ARKTEMPMIGRATION_BUCKET=<a-temp-bucket-for-migration> rclone config RCLONEREMOTENAME=<your-remote-name> rclone mkdir ${RCLONEREMOTENAME}:${ARKTEMPMIGRATION_BUCKET} rclone copy ${RCLONEREMOTENAME}:${ARKBUCKET} ${RCLONEREMOTENAME}:${ARKTEMPMIGRATIONBUCKET} rclone check ${RCLONEREMOTENAME}:${ARKBUCKET} ${RCLONEREMOTENAME}:${ARKTEMPMIGRATIONBUCKET} rclone delete ${RCLONEREMOTENAME}:${ARK_BUCKET} rclone copy ${RCLONEREMOTENAME}:${ARKTEMPMIGRATIONBUCKET} ${RCLONEREMOTENAME}:${ARKBUCKET}/backups rclone check ${RCLONEREMOTENAME}:${ARKBUCKET}/backups ${RCLONEREMOTENAME}:${ARKTEMPMIGRATIONBUCKET} ARKRESTICLOCATION=<your-ark-restic-bucket[/optional-prefix]> rclone copy ${RCLONEREMOTENAME}:${ARKRESTICLOCATION} ${RCLONEREMOTENAME}:${ARK_BUCKET}/restic rclone check ${RCLONEREMOTENAME}:${ARKBUCKET}/restic ${RCLONEREMOTENAME}:${ARKRESTIC_LOCATION} kubectl -n heptio-ark delete resticrepositories --all ```