Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lolo888
ISPConfig 3
Commits
763507d9
Commit
763507d9
authored
Sep 07, 2011
by
tbrehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed: FS#1702 - Old backup copies dont get deleted when number of copies is reduced
parent
d3687ad3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
server/cron_daily.php
server/cron_daily.php
+6
-3
No files found.
server/cron_daily.php
View file @
763507d9
...
...
@@ -461,9 +461,12 @@ if($backup_dir != '') {
// Rename or remove old backups
$backup_copies
=
intval
(
$rec
[
'backup_copies'
]);
if
(
is_file
(
$web_backup_dir
.
'/web.'
.
$backup_copies
.
'.zip'
))
unlink
(
$web_backup_dir
.
'/web.'
.
$backup_copies
.
'.zip'
);
//* delete any older backup copies that previously existed
for
(
$n
=
$backup_copies
;
$n
<=
10
;
$n
++
)
{
if
(
is_file
(
$web_backup_dir
.
'/web.'
.
$n
.
'.zip'
))
unlink
(
$web_backup_dir
.
'/web.'
.
$n
.
'.zip'
);
}
for
(
$n
=
$backup_copies
-
1
;
$n
>=
1
;
$n
--
)
{
if
(
is_file
(
$web_backup_dir
.
'/web.'
.
$n
.
'.zip'
))
{
rename
(
$web_backup_dir
.
'/web.'
.
$n
.
'.zip'
,
$web_backup_dir
.
'/web.'
.
(
$n
+
1
)
.
'.zip'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment