I have a working Cacti install running on a Windows XP workstation (just as a test). I want to move everything to a 2003 server that I have resurrected for this purpose. I've done a bit of configuration and would prefer to just backup and restore instead of starting from scratch.
So I backed up my working database: mysqldump -u root -p -l --add-drop-table cacti > mybackupfile
and saved it to a usb drive along with the entire Inetpub\wwwroot\cacti directory.
Using the combined installer I've installed 0.8.8a on the new server and tested that it is running fine with the default config.
So I then attempted to restore the backup to the new server: mysqldump -u root -p cacti < mybackupfile
Several lines scrolled by, so I assumed that everything went fine. I also copied the rra and scripts directories from the old server to the new, but when I go to http://localhost/cacti I have to log with the default username and password and see the default data.
I'm sure I missed something here, but am not quite sure what. Ideas?
Restoring Cacti Database to a Windows Server
Moderators: Developers, Moderators
-
- Posts: 9
- Joined: Wed Mar 28, 2012 3:03 pm
Re: Restoring Cacti Database to a Windows Server
I am not big on Windows but this sounds like a security / permissions issue. I would start looking there first. I hope this helps, I see no-one responded so I thought I would throw in my 2 cents worth for free.
Good Luck
Good Luck
"Knowledge can be dangerous in the wrong hands, wisdom must be added to protect the idiots!" -- me
Re: Restoring Cacti Database to a Windows Server
Also make sure your database logins are the same in the config.php for the old database. Config.php may be a different name in Windows <- not sure
"Knowledge can be dangerous in the wrong hands, wisdom must be added to protect the idiots!" -- me
Re: Restoring Cacti Database to a Windows Server
You didn't use the correct mysql command to import the database. You should've used:
mysql --user=root --password cacti < c:\apache2\htdocs\cacti\cacti.sql
mysql --user=root --password cacti < c:\apache2\htdocs\cacti\cacti.sql
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 9
- Joined: Wed Mar 28, 2012 3:03 pm
Re: Restoring Cacti Database to a Windows Server
Sorry BSOD... I'm not sure I follow.BSOD2600 wrote:You didn't use the correct mysql command to import the database. You should've used:
mysql --user=root --password cacti < c:\apache2\htdocs\cacti\cacti.sql
I backed up my old database and called it cactibackup.sql. I then copied that backup to c: on the new server.
So I assumed that I had to point mysql to that backup file in order to get it to restore:
mysql -u root -p cacti < c:\cactibackup.sql
Is this not correct?
Also... the backup is from an 8.7.i install and I am trying to restore it to an 8.8a install. Does this matter?
-
- Posts: 9
- Joined: Wed Mar 28, 2012 3:03 pm
Re: Restoring Cacti Database to a Windows Server
Ah... never mind. I'm guessing you were just referring to the general syntax... not necessarily the file name. I can see by watching the MYSQL Server data directory that the restore is taking place.
Thanks.
Thanks.
Re: Restoring Cacti Database to a Windows Server
Correct. However in your OP stated the following which is wrong:tonybemidji wrote:I backed up my old database and called it cactibackup.sql. I then copied that backup to c: on the new server.
So I assumed that I had to point mysql to that backup file in order to get it to restore:
mysql -u root -p cacti < c:\cactibackup.sql
Is this not correct?
tonybemidji wrote:So I then attempted to restore the backup to the new server: mysqldump -u root -p cacti < mybackupfile
Not really. Cacti should detect it needs to upgrade itself and will do so the next time you access the website.tonybemidji wrote:Also... the backup is from an 8.7.i install and I am trying to restore it to an 8.8a install. Does this matter?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
Who is online
Users browsing this forum: No registered users and 1 guest