Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
111
Issues
111
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
a407c995
Commit
a407c995
authored
Apr 11, 2008
by
Leigh Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set web banner to message during backup operation so that people know
why the system is sluggish.
parent
dc967daf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
db/backup.in
db/backup.in
+10
-1
No files found.
db/backup.in
View file @
a407c995
...
...
@@ -2,7 +2,7 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-200
3, 2006
University of Utah and the Flux Group.
# Copyright (c) 2000-200
8
University of Utah and the Flux Group.
# All rights reserved.
#
use
English
;
...
...
@@ -33,6 +33,7 @@ my $BACKUPDIR = "$TB/backup";
my
$LOGDIR
=
"
$TB
/log/mysql
";
my
$HOTCOPY
=
"
/usr/local/bin/mysqlhotcopy
";
my
$MYSQLDUMP
=
"
/usr/local/bin/mysqldump
";
my
$SETSITEVAR
=
"
$TB
/sbin/setsitevar
";
my
$TAR
=
"
/usr/bin/tar
";
my
$BASE
=
"
base
";
my
$UPD
=
"
update
";
...
...
@@ -92,6 +93,12 @@ if (! chdir($BACKUPDIR)) {
fatal
("
Could not chdir to
$BACKUPDIR
: $!
");
}
#
# Let people know the system will be sluggish.
#
system
("
$SETSITEVAR
web/message '<font color=red>
"
.
"
Nightly backup in progress; system might be sluggish</font>'
");
#
# Open up the index file to see what the current update file extension is.
# The base/backup files correspond to this most recent update file, and
...
...
@@ -219,6 +226,7 @@ if ($dohotcopy && -e "$BACKUPDIR/tbdb") {
#SENDMAIL("stoller@flux.utah.edu",
# "DB Backup Finished", "", undef, undef, ($logname));
system
("
$SETSITEVAR
web/message -
");
unlink
("
$logname
");
exit
0
;
...
...
@@ -228,6 +236,7 @@ sub fatal($) {
print
STDERR
"
$msg
\n
";
SENDMAIL
(
$TBOPS
,
"
DB Backup Failed
",
$msg
,
undef
,
undef
,
(
$logname
));
system
("
$SETSITEVAR
web/message -
");
unlink
("
$logname
");
exit
(
1
);
}
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