Setup backup encryption in extra step

This commit is contained in:
Johannes Zellner
2025-08-06 12:52:49 +02:00
parent 7883839871
commit 98ea5a7b70
12 changed files with 243 additions and 114 deletions
@@ -10,8 +10,6 @@ import { mountlike, s3like } from '../utils.js';
const provider = defineModel('provider');
const providerConfig = defineModel('providerConfig');
const format = defineModel('format');
const encryptionPassword = defineModel('encryptionPassword');
const encryptedFilenames = defineModel('encryptedFilenames');
const props = defineProps({
formError: {},
@@ -197,7 +195,7 @@ onMounted(async () => {
</FormGroup>
<!-- Filesystem/SSHFS/CIFS/NFS/EXT4/mountpoint -->
<Checkbox v-if="(provider === 'filesystem' || mountlike(provider)) && !importOnly" v-model="providerConfig.useHardlinks" :label="$t('backups.configureBackupStorage.hardlinksLabel')"/>
<Checkbox v-if="(provider === 'filesystem' || mountlike(provider)) && !importOnly && format === 'rsync'" v-model="providerConfig.useHardlinks" :label="$t('backups.configureBackupStorage.hardlinksLabel')"/>
<!-- CIFS/mountpoint -->
<Checkbox v-if="(provider === 'mountpoint' || provider === 'cifs') && !importOnly" v-model="providerConfig.preserveAttributes" :label="$t('backups.configureBackupStorage.preserveAttributesLabel')"/>
@@ -282,12 +280,5 @@ onMounted(async () => {
<SingleSelect id="formatInput" v-model="format" :options="BACKUP_FORMATS" option-label="name" option-key="value" required />
<div class="warning-label" v-show="format === 'rsync' && (s3like(provider) || provider === 'gcs') && !importOnly">{{ $t('backups.configureBackupStorage.s3LikeNote') }} <sup><a href="https://docs.cloudron.io/backups/#amazon-s3" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></div>
</FormGroup>
<FormGroup v-if="provider !== 'noop'">
<label for="encryptionPassswordInput">{{ $t('backups.configureBackupStorage.encryptionPassword') }} <sup><a href="https://docs.cloudron.io/backups/#encryption" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></label>
<TextInput id="encryptionPassswordInput" v-model="encryptionPassword" :placeholder="$t('backups.configureBackupStorage.encryptionPasswordPlaceholder')" />
</FormGroup>
<div class="warning-label" v-show="encryptionPassword && !importOnly">{{ $t('backups.configureBackupStorage.encryptionDescription') }}</div>
<Checkbox v-if="format === 'rsync' && encryptionPassword" v-model="encryptedFilenames" :label="$t(importOnly ? 'backups.configureBackupStorage.encryptedFilenames' : 'backups.configureBackupStorage.encryptFilenames')"/>
</div>
</template>