Hi,
I'm sorry if this is a silly question but I couldn't find the exact answer in a search of the forums, and the admin manual doesn't seem to have a section dedicated to the backup admin utility.
I used the program's backup utility in the admin panel and the program created a file on my desktop called backup.php.html. Am I supposed to import this file into my empty mysql database to restore the info? If so, do I need to change the file extension from html to txt, or something?
Any advice would be appreciated.
My backup didn't work properly, but it saved mine as a php file, so I think you'd need to rename it backup.php, upload it to your server and access it via url.
Thanks so much for your advice.
What I ended up doing was changing the file extension to .txt. This created a very neat and cognizable text file dump of every table that had been in my archive.
Then I went to my server and set up a new database, calling it the same name and creating the same username and password as before.
Then I uploaded a clean/new version of efiction to my server via ftp and ran the installer to set up the original tables.
Then I uploaded my old archive files and overwrote the new install of efiction with my old files (and fixed the permissions).
Then I went to the mysql database on the server, and using the database webmin feature, I cut and pasted the dump for each table individually into the table it belonged in via the mysql admin command window.
There were certain tables (about 4) that I had to hand edit, and I had to make some adjustments because it wouldn't let me import information for the admin account (so I had to take that info out of the dump). I also had to go back to the efiction admin panel to initialize the blocks I was using before I could put the info back in the table. But all in all, I've rescued my database, and it seems perfect, with no information lost.
Took me about two hours.
Needless to say, I don't recommend anyone do it this way. LOL
I still don't understand the usefulness of that admin backup feature in efiction if the file it makes can't be imported into the database easily... :shrugs:
If you renamed the backup.php to backup.sql, you could go into MyPHPAdmin, go to the SQL tab, where is says upload file, click the browse and point it to the backup.sql and it will import the information into the database. You might have to manually tweak a table or two, but for the most part the information will be there. And more automated than the way you described. But then again sometimes doing things the non-fast way gets you to learn it I guess.
I think there's also a way to do an import that would find and replace, but I'm not familiar enough with MySql to do that.
******************************************
Mucking around in eFiction since circa 2001 (ver. 1.0)
Now running v.3
If you renamed the backup.php to backup.sql, you could go into MyPHPAdmin, go to the SQL tab, where is says upload file, click the browse and point it to the backup.sql and it will import the information into the database.
You know, I did try to do this but it wouldn't import the sql file. I kept getting an error that said there was a conflict at "1" and it seemed to relate to the fact that since I ran the install.php again to get the tables set up, I was already in the database as "1" as the admin. For some reason, the import wouldn't work to add information to anything having to do with my admin account. I had to delete myself from the dump before importing the dump on a table-by-table basis would work. Also, there was a problem with the backup file in that it certained every table, even panels and blocks -- both of which wouldn't allow info to be added other than by making changes via the admin interface (specifically, I had to initialize the blocks before they showed up as tables that I could add info to). Last, there was an issue with the order in which the table information needed to be added that didn't coincide with the way the backup file was structured.
Anyway! I was just glad to have the backup file to work from. π
Thanks so much for your advice and input!
If you renamed the backup.php to backup.sql, you could go into MyPHPAdmin, go to the SQL tab, where is says upload file, click the browse and point it to the backup.sql and it will import the information into the database.
You know, I did try to do this but it wouldn't import the sql file. I kept getting an error that said there was a conflict at "1" and it seemed to relate to the fact that since I ran the install.php again to get the tables set up, I was already in the database as "1" as the admin.
Use phpMyAdmin and "Empty" the _authors and _authorprefs tables and you should be good to go.
If you renamed the backup.php to backup.sql, you could go into MyPHPAdmin, go to the SQL tab, where is says upload file, click the browse and point it to the backup.sql and it will import the information into the database.
You know, I did try to do this but it wouldn't import the sql file. I kept getting an error that said there was a conflict at "1" and it seemed to relate to the fact that since I ran the install.php again to get the tables set up, I was already in the database as "1" as the admin.
Use phpMyAdmin and "Empty" the _authors and _authorprefs tables and you should be good to go.
You are a doll! Thank you so much. I was afraid to do this, but it makes perfect sense. Would have saved me some time, no doubt.
Man, I learned so much over the last two day, LOL. The evolution of a virtual life. π
