encryptBackup.tsx 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import styled from '@emotion/styled';
  2. import {motion} from 'framer-motion';
  3. import {Button} from 'sentry/components/button';
  4. import {IconTerminal} from 'sentry/icons';
  5. import {t} from 'sentry/locale';
  6. import {space} from 'sentry/styles/space';
  7. import testableTransition from 'sentry/utils/testableTransition';
  8. import RelocationCodeBlock from 'sentry/views/relocation/components/relocationCodeBlock';
  9. import StepHeading from 'sentry/views/relocation/components/stepHeading';
  10. import Wrapper from 'sentry/views/relocation/components/wrapper';
  11. import {StepProps} from './types';
  12. export function EncryptBackup(props: StepProps) {
  13. const code =
  14. './sentry-admin.sh export global --encrypt-with /path/to/public_key.pub\n/path/to/encrypted/backup/file.tar';
  15. return (
  16. <Wrapper data-test-id="encrypt-backup">
  17. <StepHeading step={3}>
  18. {t('Create an encrypted backup of your current self-hosted instance')}
  19. </StepHeading>
  20. <motion.div
  21. transition={testableTransition()}
  22. variants={{
  23. initial: {y: 30, opacity: 0},
  24. animate: {y: 0, opacity: 1},
  25. exit: {opacity: 0},
  26. }}
  27. >
  28. <p>
  29. {t(
  30. 'You’ll need to have the public key saved in the previous step accessible when you run the following command in your terminal. Make sure your current working directory is the root of your `self-hosted` install when you execute it.'
  31. )}
  32. </p>
  33. <RelocationCodeBlock
  34. dark
  35. language="bash"
  36. filename="TERMINAL"
  37. icon={<IconTerminal />}
  38. hideCopyButton={false}
  39. >
  40. {code}
  41. </RelocationCodeBlock>
  42. <p className="encrypt-help">
  43. <b>{t('Understanding the command:')}</b>
  44. </p>
  45. <p>
  46. <mark>{'./sentry-admin.sh'}</mark>
  47. {t('this is a script present in your self-hosted installation')}
  48. </p>
  49. <p>
  50. <mark>{'/path/to/public/key/file.pub'}</mark>
  51. {t('path to file you created in the previous step')}
  52. </p>
  53. <p>
  54. <mark>{'/path/to/encrypted/backup/output/file.tar'}</mark>
  55. {t('file that will be uploaded in the next step')}
  56. </p>
  57. <ContinueButton priority="primary" onClick={() => props.onComplete()}>
  58. {t('Continue')}
  59. </ContinueButton>
  60. </motion.div>
  61. </Wrapper>
  62. );
  63. }
  64. export default EncryptBackup;
  65. const ContinueButton = styled(Button)`
  66. margin-top: ${space(1.5)};
  67. `;