Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(backups): move S3 retention settings to retention page

Andras Bacsaie0f85de3fefe
diff --git a/resources/views/livewire/project/shared/storages/volume-backups/retention.blade.php b/resources/views/livewire/project/shared/storages/volume-backups/retention.blade.php
index df52f8c54e..575eca1f5d 100644
--- a/resources/views/livewire/project/shared/storages/volume-backups/retention.blade.php
+++ b/resources/views/livewire/project/shared/storages/volume-backups/retention.blade.php
@@ -29,5 +29,21 @@
required />
</div>
</div>
+
+ <div>
+ <h3 class="mb-3">S3 Storage Retention</h3>
+ <div class="grid grid-cols-1 gap-2 md:grid-cols-3">
+ <x-forms.input label="Number of backups to keep" id="retentionAmountS3" type="number" min="0"
+ helper="Keeps only the specified number of most recent backups on S3 storage. Set to 0 for unlimited backups."
+ required />
+ <x-forms.input label="Days to keep backups" id="retentionDaysS3" type="number" min="0"
+ helper="Automatically removes S3 backups older than the specified number of days. Set to 0 for no time limit."
+ required />
+ <x-forms.input label="Maximum storage (GB)" id="retentionMaxStorageS3" type="number" min="0"
+ step="any"
+ helper="When total size of all backups in the current backup job exceeds this limit in GB, the oldest backups will be removed. Decimal values are supported (e.g. 0.5 for 500MB). Set to 0 for unlimited storage."
+ required />
+ </div>
+ </div>
</div>
</form>
diff --git a/resources/views/livewire/project/shared/storages/volume-backups/s3.blade.php b/resources/views/livewire/project/shared/storages/volume-backups/s3.blade.php
index fa584d192f..3bc0fb9ace 100644
--- a/resources/views/livewire/project/shared/storages/volume-backups/s3.blade.php
+++ b/resources/views/livewire/project/shared/storages/volume-backups/s3.blade.php
@@ -42,19 +42,4 @@
@endif
</div>
- <div>
- <h3 class="mb-3">S3 Storage Retention</h3>
- <div class="grid grid-cols-1 gap-2 md:grid-cols-3">
- <x-forms.input label="Number of backups to keep" id="retentionAmountS3" type="number" min="0"
- helper="Keeps only the specified number of most recent backups on S3 storage. Set to 0 for unlimited backups."
- required />
- <x-forms.input label="Days to keep backups" id="retentionDaysS3" type="number" min="0"
- helper="Automatically removes S3 backups older than the specified number of days. Set to 0 for no time limit."
- required />
- <x-forms.input label="Maximum storage (GB)" id="retentionMaxStorageS3" type="number" min="0"
- step="any"
- helper="When total size of all backups in the current backup job exceeds this limit in GB, the oldest backups will be removed. Decimal values are supported (e.g. 0.5 for 500MB). Set to 0 for unlimited storage."
- required />
- </div>
- </div>
</form>
diff --git a/tests/Feature/VolumeBackupTest.php b/tests/Feature/VolumeBackupTest.php
index eca66d6d81..3020afadb6 100644
--- a/tests/Feature/VolumeBackupTest.php
+++ b/tests/Feature/VolumeBackupTest.php
@@ -252,9 +252,9 @@ it('splits scheduled backup settings and executions across dedicated urls', func
$this->get($generalUrl.'/s3')
->assertOk()
- ->assertSeeInOrder(['S3 Storage', 'Disable Local Backup', 'S3 Storage Retention'])
+ ->assertSeeInOrder(['S3 Storage', 'Disable Local Backup'])
->assertSee('S3 Storage')
- ->assertSee('S3 Storage Retention')
+ ->assertDontSee('S3 Storage Retention')
->assertDontSee('Local Backup Retention')
->assertDontSee('Frequency')
->assertDontSee('Backup Availability:');
@@ -266,8 +266,8 @@ it('splits scheduled backup settings and executions across dedicated urls', func
$this->get($generalUrl.'/retention')
->assertOk()
->assertSee('Local Backup Retention')
+ ->assertSee('S3 Storage Retention')
->assertSee('Number of backups to keep')
- ->assertDontSee('S3 Storage Retention')
->assertDontSee('Stop containers while creating the archive')
->assertDontSee('Backup Availability:');
@@ -658,7 +658,7 @@ it('shows and saves volume S3 retention while S3 backups are disabled', function
Livewire::test(VolumeBackups::class, [
'storage' => $volume,
'resource' => $application,
- 'section' => 's3',
+ 'section' => 'retention',
])
->assertSee('S3 Storage Retention')
->set('retentionAmountS3', 12)