separate backups by team as well
This commit is contained in:
parent
e5e10ade72
commit
0432c9bef3
@ -17,7 +17,7 @@ class BackupExecution extends Component
|
|||||||
{
|
{
|
||||||
delete_backup_locally($this->execution->filename, $this->execution->scheduledDatabaseBackup->database->destination->server);
|
delete_backup_locally($this->execution->filename, $this->execution->scheduledDatabaseBackup->database->destination->server);
|
||||||
$this->execution->delete();
|
$this->execution->delete();
|
||||||
$this->emit('success', 'Backup execution deleted successfully.');
|
$this->emit('success', 'Backup deleted successfully.');
|
||||||
$this->emit('refreshBackupExecutions');
|
$this->emit('refreshBackupExecutions');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,12 +69,12 @@ class DatabaseBackupJob implements ShouldQueue
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->container_name = $this->database->uuid;
|
$this->container_name = $this->database->uuid;
|
||||||
$this->backup_dir = backup_dir() . "/" . $this->container_name;
|
$this->backup_dir = backup_dir() . "/" . Str::of($this->team->name)->slug() . '-' .$this->team->id . '/' . $this->container_name;
|
||||||
|
|
||||||
if ($this->database->name === 'coolify-db') {
|
if ($this->database->name === 'coolify-db') {
|
||||||
$this->container_name = "coolify-db";
|
$this->container_name = "coolify-db";
|
||||||
$ip = Str::slug($this->server->ip);
|
$ip = Str::slug($this->server->ip);
|
||||||
$this->backup_dir = backup_dir() . "/coolify-db-$ip";
|
$this->backup_dir = backup_dir() . "/" . Str::of($this->team->name)->slug() . '-' .$this->team->id . "/coolify-db-$ip";
|
||||||
}
|
}
|
||||||
$this->backup_file = "/dumpall-" . Carbon::now()->timestamp . ".sql";
|
$this->backup_file = "/dumpall-" . Carbon::now()->timestamp . ".sql";
|
||||||
$this->backup_location = $this->backup_dir . $this->backup_file;
|
$this->backup_location = $this->backup_dir . $this->backup_file;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user