better upgrade

This commit is contained in:
JT Smith 2005-12-07 00:16:02 +00:00
parent 9549d37033
commit 53ab84ccff
2 changed files with 8 additions and 6 deletions

View file

@ -23,6 +23,8 @@
sbin/rebuildLineage.pl
- fix [ 1356544 ] FAQ template in collaboration has wrong anchors
- fix [ 1373493 ] Upgrade script fails because parameters are not quoted
- Upgrade now uses --results-file parameter on mysqldump because some
operating system don't handle UTF-8 characters through their pipes.
6.8.0
- Switched Date::Manip to DateTime for better performance and more

View file

@ -28,8 +28,8 @@ my $help;
my $history;
my $override;
my $quiet;
my $mysql = "/usr/bin/mysql";
my $mysqldump = "/usr/bin/mysqldump";
my $mysql = "mysql";
my $mysqldump = "mysqldump";
my $backupDir = "/tmp/backups";
my $skipBackup;
my $doit;
@ -56,7 +56,7 @@ Usage: perl $0 --doit
Options:
--backupDir The folder where backups should be
created. Defaults to '/data/backups'.
created. Defaults to '$backupDir'.
--doit This flag is required. You MUST include this
flag in your command line or the upgrade
@ -69,10 +69,10 @@ Options:
flag will NOT run the upgrade.
--mysql The path to your mysql client executable.
Defaults to '/usr/bin/mysql'.
Defaults to '$mysqldump'.
--mysqldump The path to your mysqldump executable.
Defaults to '/usr/bin/mysqldump'.
Defaults to '$mysql'.
--override This utility is designed to be run as
a privileged user on Linux style systems.
@ -236,7 +236,7 @@ foreach my $filename (keys %config) {
my $cmd = qq!$dumpcmd -u"$config{$filename}{dbuser}" -p"$config{$filename}{dbpass}"!;
$cmd .= " --host=".$config{$filename}{host} if ($config{$filename}{host});
$cmd .= " --port=".$config{$filename}{port} if ($config{$filename}{port});
$cmd .= " --add-drop-table --databases ".$config{$filename}{db}." > "
$cmd .= " --add-drop-table --databases ".$config{$filename}{db}." --result-file="
.$backupTo.$slash.$config{$filename}{db}."_".$upgrade{$upgrade}{from}.".sql";
unless (system($cmd)) {
print "OK\n" unless ($quiet);