[Other doc versions]
[Doc downloads]
This page describes how to move your Stash installation from one physical machine to a different machine. For most scenarios, the overall procedure involves the following 3 steps, although your situation may not require all of these:
STASH_HOME
.See also the Stash upgrade guide. You can upgrade Stash either before or after you migrate Stash. This page does not describe any aspect of the upgrade procedure.
In preparation for migrating Stash to another server, check that you have done the following:
This section gives a brief overview of how to move the Stash data to a different machine. You do not need to do anything in this section if you will continue to use the embedded database - the Stash data is moved when you move the Stash installation.
The Stash data includes the data directories (including the Git repositories), log files, installed plugins, temporary files and caches.
You can move the Stash data:
You can also move the actual DBMS. Atlassian recommends that for large installations, Stash and the DBMS run on separate machines.
There are 2 steps:
<Stash home directory>
as described below.This section describes moving the Stash installation to a different machine.
bin\stop-stash.bat
on Windows, or bin/stop-stash.sh
on Linux and Mac.STASH_HOME
environment variable, or by the STASH_HOME
line of <Stash installation directory
>/bin/setenv.bat
.STASH_HOME
line of <Stash installation directory
>/bin/setenv.sh.
Copy the archive to the new machine and unzip it to its new location there.
STASH_HOME
, mentioned in Step 2. above, in the new <Stash installation directory
>, using the new location for your copied home directory. See either Installing Stash on Windows or Installing Stash on Linux and Mac for more information.bin\start-stash.bat
on Windows, or bin/start-stash.sh
on Linux and Mac. Once you have confirmed that the new installation of Stash is working correctly, revert the access permissions for Stash to their original values.<Stash home directory>
.If you moved the Stash data by performing a database export, you must update the stash-config.properties file in the <Stash home directory>
with the changed configuration parameters for the database connection.
The configuration parameters are described in Stash config properties.
Once the configuration parameters are updated, you should be able to start Stash on the new machine and have all your data available. Use bin\start-stash.bat
on Windows, or bin/start-stash.sh
on Linux and Mac. Once you have confirmed that the new installation of Stash is working correctly, revert the access permissions for Stash to their original values.