Upgrading your Stash home directory for Stash 3.2 manually
症状
After upgrading from an older version of Stash to Stash 3.2, you see the following error:
A fatal error has occurred
The following problem occurred which prevents Atlassian Stash from starting correctly:
- The Stash home directory could not be upgraded automatically.
Slightly different screen
If you were directed here for a slightly different screen:
A fatal error has occurred
The following problem occurred which prevents Atlassian Stash from starting correctly:
- The Stash home directory could not be upgraded automatically.
- Both old '/data/stash-home/config' and new '/data/stash-home/shared/config' exist.
- Both old '/data/stash-home/data' and new '/data/stash-home/shared/data' exist.
- Both old '/data/stash-home/plugins/installed-plugins' and new '/data/stash-home/shared/plugins/installed-plugins' exist.
- Both old '/data/stash-home/data/repositories' and new '/data/stash-home/shared/data/repositories' exist.
Please refer to Upgrading your Stash home directory for Stash 3.2 manually for more information
Please make sure you review the KB below instead:
原因
In Stash 3.2, the following locations under the Stash home directory have moved:
Before Stash 3.2 | Stash 3.2 |
---|---|
config | shared/config |
data | shared/data |
plugins/installed-plugins | shared/plugins/installed-plugins |
stash-config.properties | shared/stash-config.properties |
Other locations remain the same.
In most installations, Stash 3.2 is able to perform these moves automatically and transparently. But if you have:
- mounted parts of your Stash home directory from different devices,
- replaced some directories in your Stash home directory with relative symbolic links, or
- tried to run an older version of Stash with a Stash home directory that's already in the Stash 3.2 format
then Stash 3.2 can't perform the upgrade automatically.
ソリューション
To manually upgrade the home directory, shut down Stash, and move the folders using a command prompt window. It is recommended to do this interactively to see any errors or warnings reported by your system's mv
/move
command and resolve them appropriately.
cd ${STASH_HOME}
mkdir -p shared/plugins
mv -i config data stash-config.properties shared/
mv -i plugins/installed-plugins shared/plugins/
cd %STASH_HOME%
mkdir shared\plugins
move /-Y config shared\
move /-Y data shared\
move /-Y stash-config.properties shared\
move /-Y plugins\installed-plugins shared\plugins\
Then restart Stash!