owl17sb Posted May 21, 2006 Posted May 21, 2006 Hi When using contributions and they say "add this file in you sql database" - I add it via phpmyadmin. If the contribution does not work as I expected how do I remove the files from the data base. Most contributions allow you to amend the files in FTP and if they don't work I copy back in the original one but with the phpmyadmin ones I don't know what they have added. The contribution I loaded that did not work as expected does not appear to have caused any problems with the rest of my site so is to OK to just leave it? Thanks :)
241 Posted May 21, 2006 Posted May 21, 2006 There are a couple of methods that can be used. The first and by far the easiest is to backup your database prior to the changes being made, thus all you have to do is use your database backup to restore the database to the state it was prior to making the changes. The second is to open the sql in notepad and look at the queries then using phpmyadmin reverse the sql queries where they are new additions and where they are changes to existing entries you would need to have an idea of what the entry was prior to the changes and change them back. No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes.
owl17sb Posted May 21, 2006 Author Posted May 21, 2006 There are a couple of methods that can be used. The first and by far the easiest is to backup your database prior to the changes being made, thus all you have to do is use your database backup to restore the database to the state it was prior to making the changes. The second is to open the sql in notepad and look at the queries then using phpmyadmin reverse the sql queries where they are new additions and where they are changes to existing entries you would need to have an idea of what the entry was prior to the changes and change them back. Thanks for the Steve. I think I must be doing my back ups wrong. I use my FTP and have got a replica directory set up on my C drive. I copy all the files across and if I install anything I don't like then I copy the original .php file back Perhaps I need to see how to do a backup withing phpmyadmin. The 2 files I added were just adding a couple of new fields to the product attributes which I have decided not to use - actually I could not get it to work - but as I removed all the other info will they hurt being left there. The new fields did appear in the product attributes page but there is no way to edit them as I have uninstalled all the other info. Could I just leave them? Thanks :)
spax Posted May 21, 2006 Posted May 21, 2006 In case you misunderstood or don't know how, you need to backup your database before making any changes to it. The easiest way to do that is through your admin. If you go to admin->tools->database back up, click on the backup button, you then get the option of storing server side or to download the backup. It's best to store it server side because if you need to restore it, you just select it and click restore. You can always download a copy to your hard drive if you want. You need to create a directory called backups within the admin directory first though. I don't think leaving the unused fields you have in it now will make much of a difference as you won't be querying them. Maybe someone with better knowledge will disagree.
choosealogin Posted May 21, 2006 Posted May 21, 2006 Just to further clarify...there are 2 separate backups that should be done in any store. >the one your already doing (dowloading shop folder w/FTP) >the one Peter described (database backup) If you have one and not the other...if your site blew up for some reason, it wouldn't be pretty. :blink:
owl17sb Posted May 21, 2006 Author Posted May 21, 2006 Thanks Mark and Peter.... I can now see where I have been going wrong and I think I have just been lucky that I have not needed both. When I first started my site - seems years ago but a couple of months - I was using the backup database and within a few days needed to restore and most of the info was not there so I have to totally reinstall. From then on I have only been copying the files with FTP. I will do a database back up straight away. Many Thanks :):)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.