You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`kubectl stash migrate` command is used to check the repository integrity and then upgrade the repository version to 2. After the migration is complete, run `kubectl stash prune` to compress the repository metadata.
|`--namespace`| Indicates the namespace of the respective `Repository`. |
629
+
|`--max-unused-limit`| Tolerate given limit of unused data (absolute value in bytes with suffixes k/K, m/M, g/G, t/T, a value in % or the word 'unlimited') (default `5%`) |
630
+
|`--max-repack-size`| Maximum size to repack (allowed suffixes: k/K, m/M, g/G, t/T) |
631
+
|`--dry-run`| Do not modify the repository, just print what would be done |
632
+
|`--repack-uncompressed`| Repack all uncompressed data |
633
+
|`--repack-cacheable-only`| Only repack packs which are cacheable |
title: Upgrading Repository Format Version | Stash
3
+
menu:
4
+
docs_{{ .version }}:
5
+
identifier: how-to-upgrade
6
+
name: How to upgrade?
7
+
parent: repo-upgrade
8
+
weight: 10
9
+
product_name: stash
10
+
menu_name: docs_{{ .version }}
11
+
section_menu_id: guides
12
+
---
13
+
14
+
# Upgrading Repository Format Version
15
+
16
+
Repositories created with older versions of `Stash` use an older repository format version, which needs to be upgraded to unlock new features. This upgrade process is optional but required if you want to take advantage of the latest enhancements. Keep in mind that upgrading the repository format will increase the up-to-date Stash version needed to access it. For example, repositories upgraded to format version 2 can only be read by `Stash v2025.1.9` or later.
17
+
18
+
> Upgrading repository format version will take some time depending on the repository size. Repository issues must be corrected before upgrading. It is recommended to contact with Stash team before upgrading repository.
19
+
20
+
## How to upgrade
21
+
22
+
Upgrading to repository version 2 involves the following steps:
23
+
24
+
1.**Pause the Corresponding Backup:** Before upgrading, pause the backup associated with the repository. You can do this using the [pause backup](/docs/guides/cli/kubectl-plugin/index.md#pause-backup) command provided by the Stash kubectl plugin.
25
+
2.**Run the Migration Command:** Next, execute the [migrate](/docs/guides/cli/kubectl-plugin/index.md#migrate-repository) command provided by the Stash kubectl plugin. This command will first check the repository’s integrity and then upgrade its format to version 2. Note that if any issues are found during the integrity check, they must be resolved before the migration can proceed.
26
+
3.**Run the Prune Command:** After a successful migration, use the [prune](/docs/guides/cli/kubectl-plugin/index.md#prune) command provided by Stash kubectl plugin to compress the repository metadata. If you want to limit the amount of data rewritten in a single operation, use the `--max-repack-size` flag with the `prune` command.
27
+
4.**Resume the Corresponding Backup:** Now resume the backup associated with the repository. You can do this using the [resume backup](/docs/guides/cli/kubectl-plugin/index.md#resume-backup) command provided by the Stash kubectl plugin.
28
+
29
+
Keep in mind that the contents of files already stored in the repository will not be rewritten during the upgrade. Only data from new backups will be compressed. Over time, more and more of the repository will be automatically compressed as new backups are added.
0 commit comments