|
| 1 | +# Transferring Credentials to Another Computer |
| 2 | + |
| 3 | +__Difficulty__: Advanced. |
| 4 | + |
| 5 | +At times you may need to transfer the credentials to another computer or |
| 6 | +system, such as CI/CD. As the credentials are encrypted with the machine-specific |
| 7 | +key (machine ID), the credentials will not work straight away. |
| 8 | + |
| 9 | +Slackdump supports Machine ID override, which allows you to define the machine ID |
| 10 | +for a chosen workspace. Using the same Machine ID on your local and remote systems |
| 11 | +will allow you to use the same credentials on both. |
| 12 | + |
| 13 | +__IMPORTANT__: Never share your custom machine ID with anyone. The machine ID |
| 14 | +is a secret key to your login information. |
| 15 | + |
| 16 | +To transfer the credentials to another system, follow these steps: |
| 17 | + |
| 18 | +1. Reauthenticate in the workspace you want to transfer by specifying the |
| 19 | + machine ID override with `-machine-id` flag. For example: |
| 20 | + |
| 21 | + ```bash |
| 22 | + slackdump workspace new -machine-id="my-machine-id" your_workspace |
| 23 | + ``` |
| 24 | + |
| 25 | + This will create a new workspace file with the machine ID override. |
| 26 | + |
| 27 | +2. Run the `slackdump workspace list` command to get the workspace file name, |
| 28 | + for example: `your_workspace.bin` |
| 29 | + |
| 30 | +3. Find out the slackdump cache directory location on your system by running: |
| 31 | + |
| 32 | + ```bash |
| 33 | + slackdump tools info |
| 34 | + ``` |
| 35 | + |
| 36 | + Slackdump cache location will be in "workspace" section, "path" field. If |
| 37 | + you have `jq` installed, you can run: |
| 38 | + |
| 39 | + ```bash |
| 40 | + slackdump tools info | jq -r '.workspace.path' |
| 41 | + ``` |
| 42 | + |
| 43 | +5. Install slackdump on the remote system. |
| 44 | + |
| 45 | +6. Repeat the step 3 on the remote system to find out the cache directory. |
| 46 | + |
| 47 | +7. Create it if it doesn't exist |
| 48 | + |
| 49 | +8. Copy the workspace file and `workspace.txt` file from the cache directory to |
| 50 | + the remote system. |
| 51 | + |
| 52 | +9. Verify that the workspace is available and credentials are working by running: |
| 53 | + |
| 54 | + ```bash |
| 55 | + slackdump workspace list -a -machine-id="my-machine-id" |
| 56 | + ``` |
| 57 | + |
| 58 | + on the remote system. |
| 59 | + You should see OK in the last "error" column. If you see "failed to load |
| 60 | + stored credentials", it means that the credentials are not working. |
| 61 | + |
| 62 | +10. You can now use the credentials on the remote system. |
0 commit comments