mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-25 09:00:27 +00:00
Update Backup.php
This commit is contained in:
parent
13b5e89f81
commit
33adbec9e4
1 changed files with 3 additions and 2 deletions
|
@ -221,13 +221,14 @@ class Backup extends Model
|
|||
$findHostingSubscription = HostingSubscription::all();
|
||||
if ($findHostingSubscription->count() > 0) {
|
||||
foreach ($findHostingSubscription as $hostingSubscription) {
|
||||
$hostingSubscriptionPath = $backupTempPath .'/hosting_subscriptions/'.$hostingSubscription->system_username;
|
||||
$hostingSubscriptionsMainPath = $backupTempPath .'/hosting_subscriptions';
|
||||
$hostingSubscriptionPath = $hostingSubscriptionsMainPath .'/'. $hostingSubscription->system_username;
|
||||
$shellFileContent .= PHP_EOL;
|
||||
$shellFileContent .= 'echo "Backup up hosting subscription: ' . $hostingSubscription->system_username .'" '. PHP_EOL;
|
||||
$shellFileContent .= 'mkdir -p '.$hostingSubscriptionPath.PHP_EOL;
|
||||
|
||||
// cp -r (copy recursively, also copy hidden files)
|
||||
$shellFileContent .= 'cp -r /home/'.$hostingSubscription->system_username.'/ ' . $hostingSubscriptionPath .PHP_EOL;
|
||||
$shellFileContent .= 'cp -r /home/'.$hostingSubscription->system_username.'/ ' . $hostingSubscriptionsMainPath .PHP_EOL;
|
||||
|
||||
$shellFileContent .= 'mkdir -p '.$hostingSubscriptionPath.'/databases'.PHP_EOL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue