Migration to Another Board - Attachment Challenge

Discussion in 'Other' started by yavuz, Aug 24, 2014.

  1. yavuz

    yavuz Member

    Hello xfrocks,

    After an add-on causing attachment not be able to edit (upload - delete) I decided to migrate my data to another clean XenForo installation. Last week I finished migrating to XenForo boards which were using the data storage add-on and others too. A lot of images were mixed up, meaning for instance; thread A's images were showing up in thread B.

    Is there something to do or check before doing a migration for those who have installed your add-ons which affects the data management (attachments)?

    Currently my board has these add-ons running:

    [bd] Attachment Store
    [bd] Avatar As Attachment
    [bd] Image
    [Tinhte] Attach Image Optimization
     
  2. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Sorry, I don't really understand your questions. What kind of check do you need?
    I remember that you talked about the mixed up images before. Which add-on caused it?
     
    1. yavuz

      yavuz Member

      yavuz @xfrocks I'm asking is there something I should be doing before doing a migration? The board in which the mixup happened used the same addon that are listed above. I'm not a programmer so I have no concrete way of determining it other that guess or speculate. I'm only asking if you know a reason that would cause attachment mixup because of the addons above?
       
  3. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Okie. So you have moved migrated from one board to another board and now there are mixed up images, right?

    If it is the case, please edit the post to reveal the attachment id then open phpMyAdmin or similar tool and look for the attachment record in table xf_attachment (using the id you found in the post). Then cross check to see if the content_id of the attachment record matches the post id.
     
  4. yavuz

    yavuz Member

    I just ran an import on my board it went well until the attachments. Not one single attachment were imported although the import appear to be completed successfully. The file directory is empty.
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @yavuz Have you checked in phpMyAdmin as I described in the earlier post?

      Also, did you mean the XenForo builtin import tool? It will not be able to import [bd] Attachment Store file FYI.
       
    2. yavuz

      yavuz Member

      yavuz @xfrocks I did not understand what you wanted me to do, it's beyond me.

      Yes, I used the XenForo built importer. But isn't the file also in the default xenforo attachment directory? What should I do? None of my attachments are imported.

      Please advice, thanks.
       
    3. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @yavuz You were right, if you use external data, there is no "Keep Local Copy". In that case, you will need to run the move attachment tool in AdminCP > Tools > Rebuild Cache to move files from external data back to their default location and attempt to import attachments again.

      I have checked your message. Looks like you are just moving XenForo installations between directories? Why don't you just move the directory itself, will be much easier.
       
    4. yavuz

      yavuz Member

      yavuz @xfrocks I tried that actually but maybe not the correct way; I backed the /forum data and internal_data directory and replaced them with the old one. That didn't work. There are new things inside that are not present in the 1.3.5 version. I'm upgrading the old board to the release candidate version.

      A question; what happens when I move the files? Are the attachments going to be visible in the attachment viewer? This is new territory for me.
       
  5. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    I meant you should replace the whole XenForo directory (not the data, internal_data directories). Are they any reasons you can't use the old XenForo installation? If you only want to change the board address, moving the whole directory is easier...
     
    1. yavuz

      yavuz Member

      yavuz @xfrocks The reason I'm doing this is because I did something (hard deleted & manually deleted an addon) and now I can't upload or delete an attachment. What I wanted to achieve with this is to migrate to a clean installation to solve this and some other performance issues that nobody could a solution to.
       
  6. yavuz

    yavuz Member

    After the upgrade there is now an error log on the old board, the forum list is not accessible anymore :S
     
  7. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Okie, I see your point. Doing this is a bit extreme IMHO. You will lose a lot of data by migrating away like this.

    Now back to the issue at hand, please try to go to AdminCP of the old board. Go to Options > Attachments. Choose to save attachments in the default location.
    Then go to Tools > Rebuild Caches (still on the old board). Run the move attachment tool. It should move all your files from external data to default location.
    Go to new board and click the step button to migrate attachments.
     
  8. yavuz

    yavuz Member

    Unless I can someone can find a solution why I can't delete or upload an attachment this seems to be the extreme but only way.
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @yavuz Do you have error log? Is it related to my add-ons?
       
    2. yavuz

      yavuz Member

      yavuz @xfrocks I haven't got an idea. The strange thing is there arent. Try to delete an attachment you get "you have not the right to perform this action" error. The permissions are there the folders are writable but this error pops up.
       
  9. yavuz

    yavuz Member

    upload_2014-8-29_5-18-18.png

    I had finished the import the first time. The second time started from the beginning. Wouldn't this be cause the data to multiply? I can't just select the attachment to import can I?

    For the record; There are also a lot of error logs logged in after going back to the default mode.
     
    1. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @yavuz If you have finished the import (by clicking the button at the end of it), then you cannot redo them now. That will cause duplications.

      Regarding the old site, I can't seem to connect to it now. Strange. Also, if I have ftp access, I can come in and try to fix the delete attachments thingy.
       
      yavuz likes this.
      1
    2. yavuz

      yavuz Member

      yavuz @xfrocks If you can fix it, that would be awesome! I've send you over the FTP credentials.
       
    3. xfrocks

      xfrocks XenForo rocks!
      Staff Member

      xfrocks @yavuz I have received the credentials.
       
Loading...