Jump to content

Community

Gabriel Torres

File leftover from upgrade

Recommended Posts

Hi,

Upgrading from 3.4.x to 4.1.5 we ended up with a sitemap.xml file, which is outdated and has been replaced with sitemap.php. The upgrade script should have deleted it. I wonder if there are more files in the same situation. As such, my suggestion is to add an option or utility to scan/list/delete old/unsused files.

Thanks!

Share this post


Link to post
Share on other sites

I've just made a clean IPS 4.1.5.2 install on a separate envirnonment just to compare, and there are a bunch of stuff left over from previous versions both in terms of files and database structure. E.g.

/cache

/hooks

/ips_kernel

These are only the top-level folders. I bet there are unused files and folders inside the directory structure...

Share this post


Link to post
Share on other sites

I agree. IPS should really develop a tool for cleaning up files that are not required by the current version of IPS4. My site was originally installed with IPB 1.3, way back in 2004. It would be nice to finally get a tool that would remove unnecessary files from our respective sites.

Share this post


Link to post
Share on other sites
3 hours ago, Hitori Bocchi said:

If they develope such a tool, it could be combined as a security measure. Listing all files of the folder, highlighting which are needed, which file size they should have and which they actually have.

Yea. And also IIRC the conf_global between ips3 and 4 are different. Would have been nice to have that promoted up to ips4. I didn't even realize there was a difference until staff told me I had an older config file.

Share this post


Link to post
Share on other sites
6 hours ago, MADMAN32395 said:

Yea. And also IIRC the conf_global between ips3 and 4 are different. Would have been nice to have that promoted up to ips4. I didn't even realize there was a difference until staff told me I had an older config file.

could u possibly share your conf_global?

Share this post


Link to post
Share on other sites
On 12/25/2015 at 7:37 PM, maidos said:

could u possibly share your conf_global?

Sorry holiday has been crazy... I'll post when I'm not mobile lol

 

I setup a location reminder to bug me when I get home.

Edited by MADMAN32395

Share this post


Link to post
Share on other sites

@maidos

upgrade 3.x to 4.x (which is my live site)

<?php
$INFO['sql_driver']      =  'mysql';
$INFO['sql_host']      =  'localhost';
$INFO['sql_database']      =  '<SCRUBBED>';
$INFO['sql_user']      =  '<SCRUBBED>';
$INFO['sql_pass']      =  '<SCRUBBED>';
$INFO['sql_tbl_prefix']      =  '';
$INFO['sql_debug']      =  '0';
$INFO['sql_charset']      =  'utf8';
$INFO['board_start']      =  '1350762140';
$INFO['installed']      =  '1';
$INFO['php_ext']      =  'php';
$INFO['safe_mode']      =  '0';
$INFO['board_url']      =  'https://www.gcinema.net/forums';
$INFO['banned_group']      =  '5';
$INFO['admin_group']      =  '4';
$INFO['guest_group']      =  '2';
$INFO['member_group']      =  '3';
$INFO['auth_group']      =  '1';
$INFO['use_friendly_urls']      =  '1';
$INFO['_jsDebug']      =  '0';
$INFO['mysql_tbl_type']      =  'MyISAM';

define('IN_DEV', 0);
/* Remote archive DB - complete these details if you\'re using a remote DB for the post archive.
   If content has already been archived in the local DB, this will need transferring and will not be done automatically. */
$INFO['archive_remote_sql_host']      =  '';
$INFO['archive_remote_sql_database']      =  '';
$INFO['archive_remote_sql_user']      =  '';
$INFO['archive_remote_sql_pass']      =  '';
$INFO['archive_remote_sql_charset']      =  '';

?>

Fresh 4.x install

<?php

$INFO = array (
  'sql_host' => 'localhost',
  'sql_database' => '<SCRUBBED>',
  'sql_user' => '<SCRUBBED>',
  'sql_pass' => '<SCRUBBED>',
  'sql_port' => 3306,
  'sql_socket' => '',
  'sql_tbl_prefix' => '',
  'sql_utf8mb4' => true,
  'board_start' => 1450337938,
  'installed' => true,
  'base_url' => 'localhost',
  'guest_group' => 2,
  'member_group' => 3,
  'admin_group' => 4,
);

 

 

Share this post


Link to post
Share on other sites

Hi guys,

By the way. Here is what the support replied to me regarding this suggestion.

Quote

Better than this, I can tell you how to clean the site up properly.

First - backup, backup, backup. I cannot emphasize this enough. If you have a copy of all your files, you have something to restore should things go wrong (although in all honesty its extremely unlikely)

Delete all files and folders apart from uploads and its contents, the conf_global.php file, the constants.php (if you have one). Once you have done this, upload a fresh copy of IPS4 to your server. This will ensure you have only IPS4 required files. Then to to your admincp and get a new htaccess file from "System>Site Promotion>Search engine optimization" by clicking on the "Download this file" link, which will ensure you have a clean copy of this also.

All done. Nice tidy folder.

Kind Regards,

Marc Stridge

This is a very good answer. I wish I knew this before the upgrade... ;)

Still doesnt solve the myriad of unused tables and rows in the database, but at least is a real solution for the files. Now that we have installed apps and plugins, we must of course not delete these folders as well.

Share this post


Link to post
Share on other sites
45 minutes ago, Gabriel Torres said:

Hi guys,

By the way. Here is what the support replied to me regarding this suggestion.

This is a very good answer. I wish I knew this before the upgrade... ;)

Still doesnt solve the myriad of unused tables and rows in the database, but at least is a real solution for the files. Now that we have installed apps and plugins, we must of course not delete these folders as well.

i asked this earlier when 4 was released. 

they just simply told me to install a clean ips site and compare the tables with my existing forum and delete it from there

Share this post


Link to post
Share on other sites

Really, the best way to do this is to compare a clean install. It's very difficult to automate this because many sites have files, modifications, etc. they purposely put there -- static HTML landing pages, flash files, etc. We can't really keep a running list of every file used ever used in the software and there's a chance we'd delete or suggest deleting the wrong files. Likewise with database tables. 

We can probably put up a general how-to, however. 

Share this post


Link to post
Share on other sites
On 15/12/2015 at 9:45 PM, Gabriel Torres said:

Hi,

Upgrading from 3.4.x to 4.1.5 we ended up with a sitemap.xml file, which is outdated and has been replaced with sitemap.php. The upgrade script should have deleted it. I wonder if there are more files in the same situation. As such, my suggestion is to add an option or utility to scan/list/delete old/unsused files.

Thanks!

It was easy, this is what i've done prior to uplaod the IPS4 files.

I deleted every folder and file minus the /public, /uploads and the conf_global.php.
Then i uploaded the IPS4 files and run the upgrader.
After completed, i also deleted the /public folder.

Done and only with ips4 files on my server.

Edited by RevengeFNF

Share this post


Link to post
Share on other sites

so only common folder name 3.4 and 4 share is /uploads and /admin so if u removed the rest of the 3.4 folder all u need to do is delete uploads and admin?

Share this post


Link to post
Share on other sites
4 hours ago, Gabriel Torres said:

Hi guys,

By the way. Here is what the support replied to me regarding this suggestion.

This is a very good answer. I wish I knew this before the upgrade... ;)

Still doesnt solve the myriad of unused tables and rows in the database, but at least is a real solution for the files. Now that we have installed apps and plugins, we must of course not delete these folders as well.

But this is not right! There are folders you need to keep, like folders created by Downloads, Pages and Blogs. They are required for file system during the upgrade.

Share this post


Link to post
Share on other sites
3 hours ago, maidos said:

so only common folder name 3.4 and 4 share is /uploads and /admin so if u removed the rest of the 3.4 folder all u need to do is delete uploads and admin?

In a perfect world, you could put a htaccess password (to not have any users on your page while the update process) and then delete everything except your htacces, conf_global.php files and the uploads directory (except you have customized paths, where some files are saved) and then upload the ips4 files, but the world isn't perfect:D

@Lindy mentioned it already, people have often custom files in the forum directory, so we can't just delete everything...

Share this post


Link to post
Share on other sites

 

5 hours ago, Gabriel Torres said:

Hi guys,

By the way. Here is what the support replied to me regarding this suggestion.

This is a very good answer. I wish I knew this before the upgrade... ;)

Still doesnt solve the myriad of unused tables and rows in the database, but at least is a real solution for the files. Now that we have installed apps and plugins, we must of course not delete these folders as well.

What about the plugins and applications directories with the 3rd party or custom plugins and applications? ckeditor addons?

Edited by Machsterdaemon

Share this post


Link to post
Share on other sites
6 hours ago, Lindy said:

Really, the best way to do this is to compare a clean install. It's very difficult to automate this because many sites have files, modifications, etc. they purposely put there -- static HTML landing pages, flash files, etc. We can't really keep a running list of every file used ever used in the software and there's a chance we'd delete or suggest deleting the wrong files. Likewise with database tables. 

We can probably put up a general how-to, however. 

A general how-to would be enough because like you said, automation can fail or go wrong because not every server is the same.

Maybe a full tutorial on how to upgrade to IPS4 and remove/clean leftover files? An official one from the IPS team.

Share this post


Link to post
Share on other sites
10 hours ago, David.. said:

A general how-to would be enough because like you said, automation can fail or go wrong because not every server is the same.

Maybe a full tutorial on how to upgrade to IPS4 and remove/clean leftover files? An official one from the IPS team.

https://community.invisionpower.com/topic/407405-upgrade-from-ip-34x-to-ips40-updated/

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...