New topics: Your Pet, IOU, Baby IQ, The Poisons, Birther II, Games, Future Power

Trying out the documentation theme?

Skip to end of metadata
Go to start of metadata

Despite erasing the /data/index directory, and rebuilding the index, the index would get updated just that one time, and everything else I would add would not get updated. This means the dashboard doesn't get updated, blog posts macro doesn't update with new blog posts, etc.

I noticed I kept getting a /data/index/.timestamp file dated Feb 14, 2015.

What I had to do was go through the Confluence database and look for every CREATIONDATE and LASTMODDATE field that had a date greater than now, and replace them with the time now.

When I first setup this wiki on a new server, the time and date was not set properly in the virtual machine. That date got into a lot of records.

Here are the SQL queries I had to run to research and fix this issue:

SELECT     LINKID, CONTENTTYPE, VIEWCOUNT, URL, CONTENTID, CREATOR, CREATIONDATE, LASTMODIFIER, LASTMODDATE
FROM         EXTRNLNKS
WHERE     (CREATIONDATE > { fn NOW() })
ORDER BY CREATIONDATE


update dbo.EXTRNLNKS set creationdate = {fn NOW() } where    (CREATIONDATE > { fn NOW() })

UPDATE    EXTRNLNKS
SET              LASTMODDATE = { fn NOW() }
WHERE     (LASTMODDATE > { fn NOW() })




update dbo.CONTENT set creationdate = {fn NOW() }, LASTMODDATE = {fn NOW() }  where    (CREATIONDATE > { fn NOW() }) or (LASTMODDATE > {fn NOW()})
update dbo.CONTENT_LABEL set creationdate = {fn NOW() }, LASTMODDATE = {fn NOW() }  where    (CREATIONDATE > { fn NOW() }) or (LASTMODDATE > {fn NOW()})



SELECT * FROM ATTACHMENTS WHERE (CREATIONDATE > {fn NOW() }) or (LASTMODDATE > {fn NOW() })
SELECT * FROM CONTENT WHERE (CREATIONDATE > {fn NOW() }) or (LASTMODDATE > {fn NOW() })
SELECT * FROM CONTENT_LABEL WHERE (CREATIONDATE > {fn NOW() }) or (LASTMODDATE > {fn NOW() })
SELECT * FROM CONTENT_PERM WHERE (CREATIONDATE > {fn NOW() }) or (LASTMODDATE > {fn NOW() })
SELECT * FROM CONTENT_PERM_SET WHERE (CREATIONDATE > {fn NOW() }) or (LASTMODDATE > {fn NOW() })
SELECT * FROM CONTENTLOCK WHERE (CREATIONDATE > {fn NOW() }) or (LASTMODDATE > {fn NOW() })
SELECT * FROM DECORATOR WHERE  (LASTMODDATE > {fn NOW() })

update dbo.EXTRNLNKS set creationdate = {fn NOW() }, LASTMODDATE = {fn NOW() }  where    (CREATIONDATE > { fn NOW() }) or (LASTMODDATE > {fn NOW()})
update dbo.INDEXQUEUEENTRIES set creationdate = {fn NOW() } where    (CREATIONDATE > { fn NOW() }) 
update dbo.LABEL set creationdate = {fn NOW() }, LASTMODDATE = {fn NOW() }  where    (CREATIONDATE > { fn NOW() }) or (LASTMODDATE > {fn NOW()})
update dbo.LINKS set creationdate = {fn NOW() }, LASTMODDATE = {fn NOW() }  where    (CREATIONDATE > { fn NOW() }) or (LASTMODDATE > {fn NOW()})
update dbo.NOTIFICATIONS set creationdate = {fn NOW() }, LASTMODDATE = {fn NOW() }  where    (CREATIONDATE > { fn NOW() }) or (LASTMODDATE > {fn NOW()})

SELECT * FROM EXTRNLNKS WHERE (CREATIONDATE > {fn NOW() }) or (LASTMODDATE > {fn NOW() })
SELECT * FROM INDEXQUEUEENTRIES WHERE  (CREATIONDATE > {fn NOW() })
SELECT * FROM LABEL WHERE (CREATIONDATE > {fn NOW() }) or (LASTMODDATE > {fn NOW() })
SELECT * FROM LINKS WHERE (CREATIONDATE > {fn NOW() }) or (LASTMODDATE > {fn NOW() })
SELECT * FROM NOTIFICATIONS WHERE (CREATIONDATE > {fn NOW() }) or (LASTMODDATE > {fn NOW() })


SELECT * FROM PAGETEMPLATES WHERE (CREATIONDATE > {fn NOW() }) or (LASTMODDATE > {fn NOW() })
SELECT * FROM PLUGINDATA WHERE  (LASTMODDATE > {fn NOW() })
SELECT * FROM SPACEGROUPS WHERE (CREATIONDATE > {fn NOW() }) or (LASTMODDATE > {fn NOW() })
SELECT * FROM SPACEPERMISSIONS WHERE (CREATIONDATE > {fn NOW() }) or (LASTMODDATE > {fn NOW() })
SELECT * FROM SPACES WHERE (CREATIONDATE > {fn NOW() }) or (LASTMODDATE > {fn NOW() })
SELECT * FROM TRACKBACKLINKS WHERE (CREATIONDATE > {fn NOW() }) or (LASTMODDATE > {fn NOW() })
SELECT * FROM USERS WHERE (CREATED > {fn NOW() }) 

or

update dbo.EXTRNLNKS set creationdate = "08/20/2010" where    (CREATIONDATE > { fn NOW() })

UPDATE    EXTRNLNKS
SET              LASTMODDATE = "08/20/2010"
WHERE     (LASTMODDATE > { fn NOW() })

update dbo.CONTENT set creationdate = '08/20/2010', LASTMODDATE = '08/20/2010'  where    (CREATIONDATE > { fn NOW() }) or (LASTMODDATE > {fn NOW()})
update dbo.CONTENT_LABEL set creationdate = '08/20/2010', LASTMODDATE = '08/20/2010'  where    (CREATIONDATE > { fn NOW() }) or (LASTMODDATE > {fn NOW()})

update dbo.EXTRNLNKS set creationdate = '08/20/2010', LASTMODDATE = '08/20/2010'  where    (CREATIONDATE > { fn NOW() }) or (LASTMODDATE > {fn NOW()})
update dbo.INDEXQUEUEENTRIES set creationdate = '08/20/2010'                      where    (CREATIONDATE > { fn NOW() }) 
update dbo.LABEL set creationdate = '08/20/2010', LASTMODDATE = '08/20/2010'      where    (CREATIONDATE > { fn NOW() }) or (LASTMODDATE > {fn NOW()})
update dbo.LINKS set creationdate = '08/20/2010', LASTMODDATE = '08/20/2010'          where    (CREATIONDATE > { fn NOW() }) or (LASTMODDATE > {fn NOW()})
update dbo.NOTIFICATIONS set creationdate = '08/20/2010', LASTMODDATE = '08/20/2010'  where    (CREATIONDATE > { fn NOW() }) or (LASTMODDATE > {fn NOW()})

Also need to touch the file confluence-home//index/.timestamp

  • But that didn't seem to help. recent changes still not updating.... Maybe Confluence must also be restarted?
  • Should also fix other files whose dates have been munged:
    cd /<confluence-install>
    find . -newer data | xargs ls -al
    find . -newer data | touch
    find . -newer data | xargs ls -al
    
    cd /<confluence-data>
    find . -newer data | xargs ls -al
    find . -newer data | touch
    find . -newer data | xargs ls -al
    

Time to Solve: About 2 hours

Labels:
confluence confluence Delete
bugs bugs Delete
sql sql Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.