2023-08-10 15:52:54 +02:00
< form wire : submit . prevent = " submit " >
< div class = " flex gap-2 pb-2 " >
< h2 > Scheduled Backup </ h2 >
< x - forms . button type = " submit " >
Save
</ x - forms . button >
2023-10-10 13:10:43 +02:00
@ if ( Str :: of ( $status ) -> startsWith ( 'running' ))
< livewire : project . database . backup - now : backup = " $backup " />
@ endif
2023-08-11 16:13:53 +02:00
@ if ( $backup -> database_id !== 0 )
< x - forms . button isError wire : click = " delete " > Delete </ x - forms . button >
@ endif
2023-08-10 15:52:54 +02:00
</ div >
2023-08-11 16:13:53 +02:00
< div class = " w-32 pb-2 " >
2023-08-11 20:19:42 +02:00
< x - forms . checkbox instantSave label = " Backup Enabled " id = " backup.enabled " />
< x - forms . checkbox instantSave label = " S3 Enabled " id = " backup.save_s3 " />
2023-08-10 15:52:54 +02:00
</ div >
2023-08-11 20:19:42 +02:00
@ if ( $backup -> save_s3 )
2023-08-11 16:13:53 +02:00
< div class = " pb-6 " >
< x - forms . select id = " backup.s3_storage_id " label = " S3 Storage " required >
2023-10-09 20:37:42 +02:00
< option value = " default " > Select a S3 storage </ option >
2023-08-11 20:19:42 +02:00
@ foreach ( $s3s as $s3 )
2023-08-11 16:13:53 +02:00
< option value = " { { $s3->id }} " > {{ $s3 -> name }} </ option >
@ endforeach
</ x - forms . select >
</ div >
@ endif
2023-08-10 15:52:54 +02:00
< div class = " flex gap-2 " >
2023-10-13 15:45:24 +02:00
< x - forms . input label = " Databases To Backup " helper = " Comma separated list of databases to backup. Empty will include the default one. " id = " backup.databases_to_backup " />
2023-08-11 20:19:42 +02:00
< x - forms . input label = " Frequency " id = " backup.frequency " />
< x - forms . input label = " Number of backups to keep (locally) " id = " backup.number_of_backups_locally " />
2023-08-10 15:52:54 +02:00
</ div >
</ form >