Re: Backup Manager Not Working in Plesk
If you get the following message when trying to run a backup in Plesk using the Backup Manager then it is likely that a previous upgrade or installation of the Backup Manager did not complete and so there will be some missing tables.
0: common_func.php3:206 db_query(string 'select `value` from `BackupsSettings` WHERE `param` = 'backup_ftp_settinghost' AND `id` = 6 AND `type` = 'domain'') 1: common_func.php3:253 db_query_ex(string 'select `value` from `BackupsSettings` WHERE `param` = '?(paramName)' AND `id` = ?(objectId) AND `type` = '?(objectType)'', array) 2: BackupFTPRepositorySettings.php:205 BackupFTPRepositorySettings->getRepositorySettingsValue(string 'backup_ftp_settinghost') 3: BackupFTPRepositorySettings.php:43 BackupFTPRepositorySettings->init() 4: BackupFTPRepositorySettings.php:25 BackupFTPRepositorySettings->__construct() 5: BackupFTPRepositorySettings.php:283 BackupFTPRepositorySettingsDomain->__construct(integer '6') 6: client.domain.backup.php:8 plesk__client__domain__backup->getBackupFTPRepositorySettings() 7: backup.ftp-repository.php:35 __backup__ftp_repository->getDumpsStorageCredentials() 8: backup.ftp-repository.php:29 __backup__ftp_repository->getRepositoryList() 9: backup.abstract-repository.php:44 __backup__abstract_repository->accessItemsList(string 'GET', NULL null) 10: backup.abstract-repository.php:26 __backup__abstract_repository->accessItem(string 'GET', NULL null) 11: UIPointer.php:596 UIPointer->access(string 'GET') 12: plesk.php:38
The Plesk Backup Manager needs the following tables in the PSA database:
- BackupsSettings
- BackupsScheduled
- BackupsRunning
Execute the following SQL in phpMyAdmin to create the missing tables:
CREATE TABLE IF NOT EXISTS `BackupsSettings` ( `id` int(10) unsigned default NULL, `type` enum('domain','client','server') NOT NULL default 'domain', `param` varchar(255) NOT NULL default '', `value` varchar(255) character set utf8 default NULL, UNIQUE KEY `index1` (`id`,`type`,`param`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE IF NOT EXISTS `BackupsScheduled` ( `id` int(10) unsigned NOT NULL auto_increment, `obj_id` int(10) unsigned NOT NULL, `obj_type` enum('server','reseller','client','domain') NOT NULL, `repository` enum('local','ftp') NOT NULL default 'local', `last` datetime default NULL, `period` int(10) unsigned NOT NULL, `active` enum('true','false') NOT NULL, `processed` enum('true','false') NOT NULL, `rotation` int(11) NOT NULL default '0', `prefix` varchar(255) character set utf8 default NULL, `email` varchar(255) character set utf8 default NULL, `split_size` int(10) unsigned NOT NULL default '0', `suspend` enum('true','false') NOT NULL default 'false', `with_content` enum('true','false') NOT NULL default 'true', `backup_day` int(10) unsigned NOT NULL default '0', `backup_time` time NOT NULL default '00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=17 ; CREATE TABLE IF NOT EXISTS `BackupsRunning` ( `sessionId` varbinary(250) NOT NULL, `param` varchar(250) character set ascii NOT NULL, `val` varbinary(255) default NULL, PRIMARY KEY (`sessionId`,`param`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
This will resolve the problem, the Backup Manager will now work correctly!