FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » How can I archive it?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
How can I archive it? [message #3747] Fri, 05 July 2002 10:13 Go to next message
Zoltan Fogarasi is currently offline  Zoltan Fogarasi   Hungary
Messages: 16
Registered: June 2002
Location: Budapest, Hungary
Karma: 0
Junior Member
(I am not a bash guru.)
I have created a script, which archive all files used by forum (hope). I tried to upgrade to 2.2.0 from 2.0.2, but was unsuccessful. (I will try again and share the problems later, now the goal is to get it work again). After the failed upgrade I deleted the new files and copied back the old ones. The consistency check was OK.

My archiver script:

mkdir -p /tmp/archiv/var/forum
cp -va /var/forum/* /tmp/archiv/var/forum
#
mkdir -p /tmp/archiv/var/lib/mysql
cp -va /var/lib/mysql/* /tmp/archiv/var/lib/mysql
#
mkdir -p /tmp/archiv/var/www
cp -va /var/www/* /tmp/archiv/var/www
#
tar -z -cvvf /home/fogarasi/cemeno.tar.gz /tmp/archiv/
#rm -r /tmp/archiv

The MySQL and Apache serves only the FUDforum.

My question:
I have to expect some errors, or my procedure is functional?
OR Which files/directories must archive for having the posibility to quick copy it back and restart after a failed upgrade?

Thanks in advance:
Zoltan


Linux Debian Woody

System Configuration
PHP built On: Linux minbar 2.4.16-xfs #1 Fri Feb 8 23:46:11 CST 2002 i686 unknown
MySQL Version: 3.23.49
PHP Version: 4.1.2
Web Server: Apache/1.3.24 (Unix) Debian GNU/Linux PHP/4.1.2
WebServer to PHP interface: apache
Forum Version: 2.0.2
Relavent PHP Settings: Safe Mode: OFF
Display Errors: ON
File Uploads: ON
Magic Quotes: ON
Register Globals: ON
Output Buffering: OFF
Disabled Functions: none
PSpell Support: No
Re: How can I archive it? [message #3749 is a reply to message #3747] Fri, 05 July 2002 11:15 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The upgrade process renamed 2 fields in MySQL, which may cause the old forum 2.0.2 not to work if you were to revert back.

inside the fud2_msg table offset was renamed to foff
and inside fud2_pmsg table offset was renamed to foff

If you are converting back, you need to rename those 2 fields to their previous states.


FUDforum Core Developer
Re: How can I archive it? [message #3752 is a reply to message #3749] Fri, 05 July 2002 11:22 Go to previous messageGo to next message
Zoltan Fogarasi is currently offline  Zoltan Fogarasi   Hungary
Messages: 16
Registered: June 2002
Location: Budapest, Hungary
Karma: 0
Junior Member
If I saved the all /var/lib/mysql, and copied it back, is it OK?
Re: How can I archive it? [message #3753 is a reply to message #3747] Fri, 05 July 2002 11:23 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
In the future it is better to use the forum's admdump and admimport scripts to create backups, since that backs up not only the disk but also the MySQL data used by the forum.

FUDforum Core Developer
Re: How can I archive it? [message #3754 is a reply to message #3752] Fri, 05 July 2002 11:23 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Yeah it should be ok.

FUDforum Core Developer
Re: How can I archive it? [message #3758 is a reply to message #3754] Fri, 05 July 2002 11:46 Go to previous messageGo to next message
Zoltan Fogarasi is currently offline  Zoltan Fogarasi   Hungary
Messages: 16
Registered: June 2002
Location: Budapest, Hungary
Karma: 0
Junior Member
I upgraded again, now seems to be successful. I noticed one error, when I try to compact messages, I get the following error:

Disabling the forum for the duration of maintenance run

Please wait while forum is being compacted.
This may take a while depending on the size of your forum.
Compacting normal messages...
10% done
20% done
30% done
40% done
50% done
60% done
70% done
80% done
90% done
100% done
100% Done
Compacting private messages...
query failed: %( UPDATE fud2_pmsg SET foff=0, length=2 WHERE foff= )% because %( You have an error in your SQL syntax near '' at line 1 )%

What should I do?

Zoltan
Re: How can I archive it? [message #3759 is a reply to message #3758] Fri, 05 July 2002 11:49 Go to previous messageGo to next message
Zoltan Fogarasi is currently offline  Zoltan Fogarasi   Hungary
Messages: 16
Registered: June 2002
Location: Budapest, Hungary
Karma: 0
Junior Member
And I meet again the same error like first time. When I click to a forum title, I get the following message:

query failed: %( SELECT * FROM fud2_ses WHERE ses_id='931ea988944c6a36b8c19d840abce0f9' )% because %( Table 'fud2_ses' was not locked with LOCK TABLES )%

What I did wrong???
Re: How can I archive it? [message #3760 is a reply to message #3759] Fri, 05 July 2002 11:53 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Zoltan Fogarasi wrote on Fri, 05 July 2002 07:49

And I meet again the same error like first time. When I click to a forum title, I get the following message:

query failed: %( SELECT * FROM fud2_ses WHERE ses_id='931ea988944c6a36b8c19d840abce0f9' )% because %( Table 'fud2_ses' was not locked with LOCK TABLES )%

What I did wrong???




Is this forum 2.0.2 or 2.2.0, which gives you this error?


FUDforum Core Developer
Re: How can I archive it? [message #3761 is a reply to message #3760] Fri, 05 July 2002 11:55 Go to previous messageGo to next message
Zoltan Fogarasi is currently offline  Zoltan Fogarasi   Hungary
Messages: 16
Registered: June 2002
Location: Budapest, Hungary
Karma: 0
Junior Member
2.2.0 after upgrade from 2.0.2, like you can read in my first post.

Zoltan
Re: How can I archive it? [message #3765 is a reply to message #3761] Fri, 05 July 2002 12:24 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Zoltan Fogarasi wrote on Fri, 05 July 2002 07:55

2.2.0 after upgrade from 2.0.2, like you can read in my first post.

Zoltan


Unusual bug, I cannot seem to replicate it on my test server.
Does this happen of every page for the forum, or just the front page?

Try going to index.php?t=login or index.php?t=actions for example.


FUDforum Core Developer
Re: How can I archive it? [message #3766 is a reply to message #3758] Fri, 05 July 2002 12:42 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Zoltan Fogarasi wrote on Fri, 05 July 2002 07:46

I upgraded again, now seems to be successful. I noticed one error, when I try to compact messages, I get the following error:

Disabling the forum for the duration of maintenance run

Please wait while forum is being compacted.
This may take a while depending on the size of your forum.
Compacting normal messages...
10% done
20% done
30% done
40% done
50% done
60% done
70% done
80% done
90% done
100% done
100% Done
Compacting private messages...
query failed: %( UPDATE fud2_pmsg SET foff=0, length=2 WHERE foff= )% because %( You have an error in your SQL syntax near '' at line 1 )%

What should I do?

Zoltan


Found the bug in the compactor code.

Attached is the patched version of the file.
  • Attachment: compact.php
    (Size: 7.07KB, Downloaded 732 times)


FUDforum Core Developer
Re: How can I archive it? [message #3768 is a reply to message #3766] Fri, 05 July 2002 14:18 Go to previous message
Zoltan Fogarasi is currently offline  Zoltan Fogarasi   Hungary
Messages: 16
Registered: June 2002
Location: Budapest, Hungary
Karma: 0
Junior Member
Thank you, it's OK now.

Have a nice week-end:
Zoltan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to get Referrals?
Next Topic: how do i delete forum files? - permissions error
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 02:16:03 GMT 2024

Total time taken to generate the page: 0.02621 seconds