diff --git a/ChangeLog b/ChangeLog index eb30980a..eeb42b8b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17375,3 +17375,9 @@ 2018-08-13 Fred Gleason * Moved execution of maintenance routines from ripcd(8) to rdservice(8). +2018-08-13 Fred Gleason + * Removed support for the 'Backup Database' ['DB'] RML. + * Removed support for automatic DB backup. + * Dropped the 'STATIONS.BACKUP_DIR' and 'STATIONS.BACKUP_LIFE' + fields drom the database. + * Incremented the database version to 296. diff --git a/docs/opsguide/rml.xml b/docs/opsguide/rml.xml index d82c8ed1..1d1f8ccf 100644 --- a/docs/opsguide/rml.xml +++ b/docs/opsguide/rml.xml @@ -454,33 +454,6 @@ - - Database Backup [DB] - - - - Module - ripcd8 - - - Mnemonic - DB - - - - - Backup the Rivendell database. - - - DB - filename! - - - Create a backup copy of the active Rivendell database in - filename. - - - Disconnect Jack Ports [JD] diff --git a/lib/dbversion.h b/lib/dbversion.h index e9d8e994..894bf1b8 100644 --- a/lib/dbversion.h +++ b/lib/dbversion.h @@ -24,7 +24,7 @@ /* * Current Database Version */ -#define RD_VERSION_DATABASE 295 +#define RD_VERSION_DATABASE 296 #endif // DBVERSION_H diff --git a/lib/rdmacro.cpp b/lib/rdmacro.cpp index 5df82e26..d66834fd 100644 --- a/lib/rdmacro.cpp +++ b/lib/rdmacro.cpp @@ -229,7 +229,6 @@ RDMacro RDMacro::fromString(const QString &str,RDMacro::Role role) case RDMacro::CE: case RDMacro::CL: case RDMacro::CP: - case RDMacro::DB: case RDMacro::DL: case RDMacro::DP: case RDMacro::DS: diff --git a/lib/rdmacro.h b/lib/rdmacro.h index 6f6eccb0..7d5e22b2 100644 --- a/lib/rdmacro.h +++ b/lib/rdmacro.h @@ -39,16 +39,15 @@ class RDMacro { public: enum Command {AG=0x4147,AL=0x414C,BO=0x424F,CC=0x4343,CE=0x4345,CL=0x434C, - CP=0x4350,DB=0x4442,DL=0x444C,DP=0x4450,DS=0x4453,DX=0x4458, - EX=0x4558,FS=0x4653,GE=0x4745,GI=0x4749,GO=0x474F,JC=0x4A43, - JD=0x4A44,LB=0x4C42,LC=0x4C43,LL=0x4C4C,LO=0x4C4F,MB=0x4D42, - MD=0x4D44,MN=0x4D4E,MT=0x4D54,NN=0x4E4E,PB=0x5042,PC=0x5043, - PD=0x5044,PE=0x5045,PL=0x504C,PM=0x504D,PN=0x504E,PP=0x5050, - PS=0x5053,PT=0x5054,PU=0x5055,PW=0x5057,PX=0x5058,RL=0x524C, - RN=0x524E,RS=0x5253,RR=0x5252,SA=0x5341,SC=0x5343,SD=0x5344, - SG=0x5347,SI=0x5349,SL=0x534C,SN=0x534e,SO=0x534F,SP=0x5350, - SR=0x5352,ST=0x5354,SX=0x5358,SY=0x5359,SZ=0x535A,TA=0x5441, - UO=0x554F}; + CP=0x4350,DL=0x444C,DP=0x4450,DS=0x4453,DX=0x4458,EX=0x4558, + FS=0x4653,GE=0x4745,GI=0x4749,GO=0x474F,JC=0x4A43,JD=0x4A44, + LB=0x4C42,LC=0x4C43,LL=0x4C4C,LO=0x4C4F,MB=0x4D42,MD=0x4D44, + MN=0x4D4E,MT=0x4D54,NN=0x4E4E,PB=0x5042,PC=0x5043,PD=0x5044, + PE=0x5045,PL=0x504C,PM=0x504D,PN=0x504E,PP=0x5050,PS=0x5053, + PT=0x5054,PU=0x5055,PW=0x5057,PX=0x5058,RL=0x524C,RN=0x524E, + RS=0x5253,RR=0x5252,SA=0x5341,SC=0x5343,SD=0x5344,SG=0x5347, + SI=0x5349,SL=0x534C,SN=0x534e,SO=0x534F,SP=0x5350,SR=0x5352, + ST=0x5354,SX=0x5358,SY=0x5359,SZ=0x535A,TA=0x5441,UO=0x554F}; enum Role {Invalid=0,Cmd=1,Reply=2}; RDMacro(); RDMacro::Role role() const; diff --git a/lib/rdstation.cpp b/lib/rdstation.cpp index 78a74826..a24f17fa 100644 --- a/lib/rdstation.cpp +++ b/lib/rdstation.cpp @@ -205,30 +205,6 @@ void RDStation::setTimeOffset(int msecs) } -QString RDStation::backupPath() const -{ - return RDGetSqlValue("STATIONS","NAME",station_name,"BACKUP_DIR").toString(); -} - - -void RDStation::setBackupPath(QString path) const -{ - SetRow("BACKUP_DIR",path); -} - - -int RDStation::backupLife() const -{ - return RDGetSqlValue("STATIONS","NAME",station_name,"BACKUP_LIFE").toInt(); -} - - -void RDStation::setBackupLife(int days) const -{ - SetRow("BACKUP_LIFE",days); -} - - unsigned RDStation::heartbeatCart() const { return RDGetSqlValue("STATIONS","NAME",station_name,"HEARTBEAT_CART"). diff --git a/lib/rdstation.h b/lib/rdstation.h index 9ccb1692..6154931d 100644 --- a/lib/rdstation.h +++ b/lib/rdstation.h @@ -56,10 +56,6 @@ class RDStation QString webServiceUrl(RDConfig *config) const; int timeOffset(); void setTimeOffset(int msecs); - QString backupPath() const; - void setBackupPath(QString path) const; - int backupLife() const; - void setBackupLife(int days) const; unsigned heartbeatCart() const; void setHeartbeatCart(unsigned cartnum) const; unsigned heartbeatInterval() const; diff --git a/rdadmin/Makefile.am b/rdadmin/Makefile.am index 86b6aeae..e381206c 100644 --- a/rdadmin/Makefile.am +++ b/rdadmin/Makefile.am @@ -1,8 +1,8 @@ -## automake.am +## Makefile.am ## ## Automake.am for rivendell/rdadmin ## -## (C) Copyright 2002-2006,2016-2018 Fred Gleason +## (C) Copyright 2002-2018 Fred Gleason ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License version 2 as @@ -55,7 +55,6 @@ dist_rdadmin_SOURCES = add_feed.cpp add_feed.h\ add_user.cpp add_user.h\ autofill_carts.cpp autofill_carts.h\ edit_audios.cpp edit_audios.h\ - edit_backup.cpp edit_backup.h\ edit_cartslots.cpp edit_cartslots.h\ edit_channelgpios.cpp edit_channelgpios.h\ edit_decks.cpp edit_decks.h\ @@ -132,7 +131,6 @@ nodist_rdadmin_SOURCES = moc_add_feed.cpp\ moc_add_user.cpp\ moc_autofill_carts.cpp\ moc_edit_audios.cpp\ - moc_edit_backup.cpp\ moc_edit_cartslots.cpp\ moc_edit_channelgpios.cpp\ moc_edit_decks.cpp\ diff --git a/rdadmin/edit_backup.cpp b/rdadmin/edit_backup.cpp deleted file mode 100644 index a717c906..00000000 --- a/rdadmin/edit_backup.cpp +++ /dev/null @@ -1,169 +0,0 @@ -// edit_backup.cpp -// -// Edit an automatic backup configuration. -// -// (C) Copyright 2002-2004,2016 Fred Gleason -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2 as -// published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public -// License along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// - -#include -#include -#include -#include -#include -//Added by qt3to4: -#include - -#include -#include - -#include - -EditBackup::EditBackup(RDStation *station,QWidget *parent) - : QDialog(parent) -{ - // - // Fix the Window Size - // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - // - // Create Fonts - // - QFont small_font=QFont("Helvetica",12,QFont::Bold); - small_font.setPixelSize(12); - QFont big_font=QFont("Helvetica",14,QFont::Bold); - big_font.setPixelSize(14); - - // - // Text Validator - // - RDTextValidator *validator=new RDTextValidator(this); - - // - // Dialog Name - // - edit_station=station; - setCaption(tr("Backup config for ")+station->name()); - - // - // Backup Life - // - edit_life_box=new QSpinBox(this); - edit_life_box->setGeometry(155,10,40,19); - edit_life_box->setMinValue(0); - edit_life_box->setMaxValue(30); - QLabel *edit_life_box_label= - new QLabel(edit_life_box,tr("Keep Backups For:"),this); - edit_life_box_label->setGeometry(10,10,140,19); - edit_life_box_label->setFont(small_font); - edit_life_box_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); - QLabel *edit_life_box_unit=new QLabel(tr("days"),this); - edit_life_box_unit->setGeometry(200,10,120,19); - edit_life_box_unit->setFont(small_font); - edit_life_box_unit->setAlignment(Qt::AlignLeft|Qt::AlignVCenter|Qt::TextShowMnemonic); - connect(edit_life_box,SIGNAL(valueChanged(int)), - this,SLOT(lifeChangedData(int))); - - // - // Backup Directory - // - edit_path_edit=new QLineEdit(this); - edit_path_edit->setGeometry(155,35,sizeHint().width()-165,19); - edit_path_edit->setValidator(validator); - edit_path_label=new QLabel(edit_life_box,tr("Backup Directory:"),this); - edit_path_label->setGeometry(10,35,140,19); - edit_path_label->setFont(small_font); - edit_path_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic); - - // - // Ok Button - // - QPushButton *ok_button=new QPushButton(this); - ok_button->setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50); - ok_button->setDefault(true); - ok_button->setFont(small_font); - ok_button->setText(tr("&OK")); - connect(ok_button,SIGNAL(clicked()),this,SLOT(okData())); - - // - // Cancel Button - // - QPushButton *cancel_button=new QPushButton(this); - cancel_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60, - 80,50); - cancel_button->setFont(small_font); - cancel_button->setText(tr("&Cancel")); - connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData())); - - // - // Populate Data - // - edit_life_box->setValue(edit_station->backupLife()); - edit_path_edit->setText(edit_station->backupPath()); - lifeChangedData(edit_life_box->value()); -} - - -EditBackup::~EditBackup() -{ -} - - -QSize EditBackup::sizeHint() const -{ - return QSize(375,130); -} - - -QSizePolicy EditBackup::sizePolicy() const -{ - return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); -} - - -void EditBackup::lifeChangedData(int days) -{ - if(days==0) { - edit_path_label->setDisabled(true); - edit_path_edit->setDisabled(true); - } - else { - edit_path_label->setEnabled(true); - edit_path_edit->setEnabled(true); - } -} - - -void EditBackup::okData() -{ - if((edit_life_box->value()>0)&&(edit_path_edit->text().isEmpty())) { - QMessageBox::warning(this,tr("Path Missing"), - tr("You must supply a backup path!")); - return; - } - edit_station->setBackupLife(edit_life_box->value()); - edit_station->setBackupPath(edit_path_edit->text()); - done(0); -} - - -void EditBackup::cancelData() -{ - done(-1); -} diff --git a/rdadmin/edit_backup.h b/rdadmin/edit_backup.h deleted file mode 100644 index c6e5f5e8..00000000 --- a/rdadmin/edit_backup.h +++ /dev/null @@ -1,55 +0,0 @@ -// edit_backup.h -// -// Edit an automatic backup configuration -// -// (C) Copyright 2002-2004,2016 Fred Gleason -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2 as -// published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public -// License along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// - -#ifndef EDIT_BACKUP_H -#define EDIT_BACKUP_H - -#include -#include -#include -#include -#include - -#include - -class EditBackup : public QDialog -{ - Q_OBJECT - public: - EditBackup(RDStation *station,QWidget *parent=0); - ~EditBackup(); - QSize sizeHint() const; - QSizePolicy sizePolicy() const; - - private slots: - void lifeChangedData(int days); - void okData(); - void cancelData(); - - private: - RDStation *edit_station; - QSpinBox *edit_life_box; - QLineEdit *edit_path_edit; - QLabel *edit_path_label; -}; - - -#endif - diff --git a/rdadmin/edit_station.cpp b/rdadmin/edit_station.cpp index bdf56c44..04a64bc6 100644 --- a/rdadmin/edit_station.cpp +++ b/rdadmin/edit_station.cpp @@ -43,7 +43,6 @@ #include "view_adapters.h" #include "edit_audios.h" -#include "edit_backup.h" #include "edit_cartslots.h" #include "edit_decks.h" #include "list_dropboxes.h" @@ -434,15 +433,6 @@ EditStation::EditStation(QString sname,QWidget *parent) station_jack_button->setText(tr("JACK\nSettings")); connect(station_jack_button,SIGNAL(clicked()),this,SLOT(jackSettingsData())); - // - // Backups Configuration Button - // - station_backups_button=new QPushButton(this); - station_backups_button->setFont(font); - station_backups_button->setText(tr("Backups")); - connect(station_backups_button,SIGNAL(clicked()), - this,SLOT(editBackupsData())); - // // Ok Button // @@ -840,13 +830,6 @@ void EditStation::editHostvarsData() delete list_conf; } -void EditStation::editBackupsData() -{ - EditBackup *edit_backup=new EditBackup(station_station,this); - edit_backup->exec(); - delete edit_backup; -} - void EditStation::editDropboxesData() { @@ -998,9 +981,7 @@ void EditStation::resizeEvent(QResizeEvent *e) station_adapters_button->setGeometry(290,533,80,50); - station_jack_button->setGeometry(110,593,80,50); - - station_backups_button->setGeometry(200,593,80,50); + station_jack_button->setGeometry(155,593,80,50); station_ok_button->setGeometry(size().width()-180,size().height()-60,80,50); station_cancel_button-> diff --git a/rdadmin/edit_station.h b/rdadmin/edit_station.h index 55667166..c5b2345a 100644 --- a/rdadmin/edit_station.h +++ b/rdadmin/edit_station.h @@ -69,7 +69,6 @@ class EditStation : public QDialog void editTtyData(); void editSwitcherData(); void editHostvarsData(); - void editBackupsData(); void editDropboxesData(); void jackSettingsData(); void startCartClickedData(); @@ -147,11 +146,9 @@ class EditStation : public QDialog QPushButton *station_ttys_button; QPushButton *station_adapters_button; QPushButton *station_jack_button; - QPushButton *station_backups_button; QPushButton *station_ok_button; QPushButton *station_cancel_button; }; -#endif - +#endif // EDIT_STATION_H diff --git a/rdadmin/rdadmin_cs.ts b/rdadmin/rdadmin_cs.ts index 54f8c57f..25a70107 100644 --- a/rdadmin/rdadmin_cs.ts +++ b/rdadmin/rdadmin_cs.ts @@ -782,35 +782,35 @@ a záloha původní databáze uložena v EditBackup Backup config for - Záloha nastavení pro + Záloha nastavení pro Keep Backups For: - Uchovat zálohy po: + Uchovat zálohy po: days - dnů + dnů Backup Directory: - Adresář pro zálohy: + Adresář pro zálohy: &OK - &OK + &OK &Cancel - Z&rušit + Z&rušit Path Missing - Cesta chybí + Cesta chybí You must supply a backup path! - Musíte zadat cestu pro zálohu! + Musíte zadat cestu pro zálohu! @@ -3679,7 +3679,7 @@ serveru Backups - Zálohy + Zálohy &OK diff --git a/rdadmin/rdadmin_de.ts b/rdadmin/rdadmin_de.ts index 0bf88198..38fdb460 100644 --- a/rdadmin/rdadmin_de.ts +++ b/rdadmin/rdadmin_de.ts @@ -708,35 +708,35 @@ worden. Aktuelle Version EditBackup Backup config for - Konfigurationsbackup für + Konfigurationsbackup für Keep Backups For: - Backups behalten für: + Backups behalten für: days - Tage + Tage Backup Directory: - Backup-Verzeichnis: + Backup-Verzeichnis: &OK - &OK + &OK &Cancel - Abbre&chen + Abbre&chen Path Missing - Pfad fehlt + Pfad fehlt You must supply a backup path! - Sie müssen einen Backup-Pfad angeben! + Sie müssen einen Backup-Pfad angeben! @@ -3578,7 +3578,7 @@ Variablen Backups - Backups + Backups &OK diff --git a/rdadmin/rdadmin_es.ts b/rdadmin/rdadmin_es.ts index d641ed74..74df3770 100644 --- a/rdadmin/rdadmin_es.ts +++ b/rdadmin/rdadmin_es.ts @@ -790,35 +790,35 @@ y un respaldo de la base de datos se guardó en EditBackup Backup config for - Configuración de respaldo para + Configuración de respaldo para Keep Backups For: - Mantener respald. por: + Mantener respald. por: days - días + días Backup Directory: - Carpeta de Respaldos: + Carpeta de Respaldos: &OK - &Aceptar + &Aceptar &Cancel - &Cancelar + &Cancelar Path Missing - Directorio no encontrado + Directorio no encontrado You must supply a backup path! - ¡Debe indicar un directorio para el respaldo! + ¡Debe indicar un directorio para el respaldo! @@ -3678,7 +3678,7 @@ del Equipo Backups - Respaldos + Respaldos &OK diff --git a/rdadmin/rdadmin_fr.ts b/rdadmin/rdadmin_fr.ts index b2fc89fe..be020747 100644 --- a/rdadmin/rdadmin_fr.ts +++ b/rdadmin/rdadmin_fr.ts @@ -464,41 +464,6 @@ - - EditBackup - - Backup config for - - - - Keep Backups For: - - - - days - - - - Backup Directory: - - - - &OK - - - - &Cancel - - - - Path Missing - - - - You must supply a backup path! - - - EditCartSlots @@ -3158,10 +3123,6 @@ GPIO Variables - - Backups - - &OK diff --git a/rdadmin/rdadmin_nb.ts b/rdadmin/rdadmin_nb.ts index d415bdc1..d9f3e2c4 100644 --- a/rdadmin/rdadmin_nb.ts +++ b/rdadmin/rdadmin_nb.ts @@ -690,35 +690,35 @@ oppdatert til versjon EditBackup Backup config for - Sikringskopi-oppsett for + Sikringskopi-oppsett for Keep Backups For: - Lagra sikringskopiar i: + Lagra sikringskopiar i: days - dagar + dagar Backup Directory: - Mappe for sikringskopiar: + Mappe for sikringskopiar: &OK - &OK + &OK &Cancel - &Avbryt + &Avbryt Path Missing - Manglar stig + Manglar stig You must supply a backup path! - Du må velja ein stig til sikringskopi-mappa! + Du må velja ein stig til sikringskopi-mappa! @@ -3554,7 +3554,7 @@ Variables Backups - Sikringskopiar + Sikringskopiar &OK diff --git a/rdadmin/rdadmin_nn.ts b/rdadmin/rdadmin_nn.ts index d415bdc1..d9f3e2c4 100644 --- a/rdadmin/rdadmin_nn.ts +++ b/rdadmin/rdadmin_nn.ts @@ -690,35 +690,35 @@ oppdatert til versjon EditBackup Backup config for - Sikringskopi-oppsett for + Sikringskopi-oppsett for Keep Backups For: - Lagra sikringskopiar i: + Lagra sikringskopiar i: days - dagar + dagar Backup Directory: - Mappe for sikringskopiar: + Mappe for sikringskopiar: &OK - &OK + &OK &Cancel - &Avbryt + &Avbryt Path Missing - Manglar stig + Manglar stig You must supply a backup path! - Du må velja ein stig til sikringskopi-mappa! + Du må velja ein stig til sikringskopi-mappa! @@ -3554,7 +3554,7 @@ Variables Backups - Sikringskopiar + Sikringskopiar &OK diff --git a/rdadmin/rdadmin_pt_BR.ts b/rdadmin/rdadmin_pt_BR.ts index f682f016..0544a998 100644 --- a/rdadmin/rdadmin_pt_BR.ts +++ b/rdadmin/rdadmin_pt_BR.ts @@ -679,35 +679,35 @@ atualizada para a Versão EditBackup Backup config for - Configuração de cópia de Segurança para + Configuração de cópia de Segurança para Keep Backups For: - Guardar Backups por: + Guardar Backups por: days - dias + dias Backup Directory: - Diretório do Backup: + Diretório do Backup: &OK - &OK + &OK &Cancel - &Cancelar + &Cancelar Path Missing - Está faltando o caminho + Está faltando o caminho You must supply a backup path! - Você deve inserir um caminho para a cópia de segurança! + Você deve inserir um caminho para a cópia de segurança! @@ -3580,7 +3580,7 @@ Encoders Backups - Cópias de + Cópias de Segurança diff --git a/ripcd/local_macros.cpp b/ripcd/local_macros.cpp index 29e660c6..66caf03e 100644 --- a/ripcd/local_macros.cpp +++ b/ripcd/local_macros.cpp @@ -271,29 +271,6 @@ void MainObject::RunLocalMacros(RDMacro *rml_in) return; break; - case RDMacro::DB: - if(rml->argQuantity()!=1) { - if(rml->echoRequested()) { - rml->acknowledge(false); - sendRml(rml); - } - return; - } - if(fork()==0) { - cmd=QString().sprintf("mysqldump -c Rivendell -h %s -u %s -p%s > %s", - (const char *)rda->config()->mysqlHostname(), - (const char *)rda->config()->mysqlUsername(), - (const char *)rda->config()->mysqlPassword(), - (const char *)rml->arg(0)); - system((const char *)cmd); - exit(0); - } - if(rml->echoRequested()) { - rml->acknowledge(true); - sendRml(rml); - } - break; - case RDMacro::GI: if(rml->argQuantity()!=5) { if(rml->echoRequested()) { diff --git a/ripcd/ripcd.cpp b/ripcd/ripcd.cpp index 5122cccd..7fd3d6c1 100644 --- a/ripcd/ripcd.cpp +++ b/ripcd/ripcd.cpp @@ -172,14 +172,6 @@ MainObject::MainObject(QObject *parent) ripcd_notification_mcaster->bind(RD_NOTIFICATION_PORT); ripcd_notification_mcaster->subscribe(rda->system()->notificationAddress()); - // - // Database Backup Timer - // - databaseBackup(); - ripcd_backup_timer=new QTimer(this); - connect(ripcd_backup_timer,SIGNAL(timeout()),this,SLOT(databaseBackup())); - ripcd_backup_timer->start(86400000); - // // Exit Timer // @@ -293,33 +285,6 @@ void MainObject::rmlReplyData() } -void MainObject::databaseBackup() -{ - QString cmd; - QDateTime datetime=QDateTime::currentDateTime(); - int life; - - if((life=rda->station()->backupLife())<=0) { - return; - } - if(fork()==0) { - cmd=QString().sprintf("find %s -name *.sql -ctime +%d -exec rm \\{\\} \\;", - (const char *)rda->station()->backupPath(), - rda->station()->backupLife()); - system((const char *)cmd); - cmd=QString(). - sprintf("mysqldump -c Rivendell -h %s -u %s -p%s > %s/%s.sql", - (const char *)rda->config()->mysqlHostname(), - (const char *)rda->config()->mysqlUsername(), - (const char *)rda->config()->mysqlPassword(), - (const char *)rda->station()->backupPath(), - (const char *)datetime.date().toString("yyyyMMdd")); - system((const char *)cmd); - exit(0); - } -} - - void MainObject::readyReadData(int conn_id) { char data[1501]; diff --git a/ripcd/ripcd.h b/ripcd/ripcd.h index 5a69905f..9816dc82 100644 --- a/ripcd/ripcd.h +++ b/ripcd/ripcd.h @@ -74,7 +74,6 @@ class MainObject : public QObject void gpoStateData(int matrix,unsigned line,bool state); void ttyTrapData(int cartnum); void ttyScanData(); - void databaseBackup(); void macroTimerData(int num); void readyReadData(int conn_id); void killData(int conn_id); @@ -125,7 +124,6 @@ class MainObject : public QObject RDTTYDevice *ripcd_tty_dev[MAX_TTYS]; RDTty::Termination ripcd_tty_term[MAX_TTYS]; RDCodeTrap *ripcd_tty_trap[MAX_TTYS]; - QTimer *ripcd_backup_timer; bool ripc_onair_flag; QTimer *ripc_macro_timer[RD_MAX_MACRO_TIMERS]; unsigned ripc_macro_cart[RD_MAX_MACRO_TIMERS]; diff --git a/utils/rddbmgr/revertschema.cpp b/utils/rddbmgr/revertschema.cpp index d22f9ade..36c175e1 100644 --- a/utils/rddbmgr/revertschema.cpp +++ b/utils/rddbmgr/revertschema.cpp @@ -38,6 +38,25 @@ bool MainObject::RevertSchema(int cur_schema,int set_schema,QString *err_msg) co // + // + // Revert 296 + // + if((cur_schema==296)&&(set_schemacur_schema)) { + sql=QString("alter table STATIONS drop column BACKUP_DIR"); + if(!RDSqlQuery::apply(sql,err_msg)) { + return false; + } + sql=QString("alter table STATIONS drop column BACKUP_LIFE"); + if(!RDSqlQuery::apply(sql,err_msg)) { + return false; + } + + WriteSchemaVersion(++cur_schema); + } + //