{t( '1. The backup can only capture the data that has been written to the volume at the beginning of the backup task, excluding the data in the cache at that time.' )}
{t( '2. To ensure the integrity of the data, it is recommended that you suspend the write operation of all files when creating a backup.' )}
); export const backupModeList = [ { value: false, label: t('Full Backup') }, { value: true, label: t('Increment Backup') }, ]; export const modeTip = t( 'Create a full backup, the system will automatically create a new backup chain, the full backup name is the backup chain name; Create an incremental backup, the system will automatically create an incremental backup under the newly created backup chain.' ); export const backupColumns = []; export const backupPointColumns = [ { title: t('Name'), dataIndex: 'name', ellipsis: true, }, { title: t('Size'), dataIndex: 'size', isHideable: true, render: (value) => `${value} GiB`, }, { title: t('Status'), dataIndex: 'status', render: (value) => backupStatus[value] || value, }, { title: t('Backup Mode'), dataIndex: 'is_incremental', isHideable: true, render: (value) => { if (value) { return ( <> {' '}{t('1. The volume associated with the backup is available.')}
{t( '2. The volume associated with the backup has been mounted, and the instance is shut down.' )}
); // deal with quota export async function fetchQuota(self) { self.setState({ quota: {}, quotaLoading: true, }); const result = await globalProjectStore.fetchProjectCinderQuota(); self.setState({ quota: result, quotaLoading: false, }); } export const getQuota = (cinderQuota) => { const { backups = {}, backup_gigabytes: gigabytes = {} } = cinderQuota || {}; return { backups, gigabytes, }; }; export const getAdd = (cinderQuota) => { const { backups, gigabytes } = getQuota(cinderQuota); const { left = 0 } = backups || {}; const { left: sizeLeft = 0, limit } = gigabytes || {}; const { currentVolumeSize = 0 } = globalBackupStore; const add = left !== 0 && (limit === -1 || sizeLeft >= currentVolumeSize) ? 1 : 0; return { add, addSize: add === 1 ? currentVolumeSize : 0, }; }; export const getQuotaInfo = (self) => { const { quota = {}, quotaLoading } = self.state; if (quotaLoading) { return []; } const { backups = {}, gigabytes = {} } = getQuota(quota); const { add, addSize } = getAdd(quota); const backupData = { ...backups, add, name: 'backup', title: t('Volume Backup'), }; const sizeData = { ...gigabytes, add: addSize, name: 'gigabytes', title: t('Volume Backup Gigabytes (GiB)'), type: 'line', }; return [backupData, sizeData]; }; export const checkQuotaDisable = () => { const { cinderQuota = {} } = globalProjectStore; const { add } = getAdd(cinderQuota); return add === 0; };