Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-10-2008, 10:20 AM
webspawner webspawner is offline
 
Join Date: Dec 2007
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default moving form to a new server/webhost

I searched these forums but could not find the answer:

I need to know if moving server would be a straight swap for the forums.

In other words, is it as simple as backing up the sql database and files from FTP (forum has already been installed obviously) and then just restoring them in the new database, reuploading the config and altering the database information and script paths in config?

Is it as simple as that? What about permissions?

Are permissions automatically set when installed or can I re-CHMOD these files/directories?

Please help,

Thanks,
Reply With Quote
  #2  
Old 03-10-2008, 10:29 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Moving Servers
Reply With Quote
  #3  
Old 03-10-2008, 10:30 AM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The permissions should stay the same, depending on how they was backed up, most host panels will retain the correct permissions for the file structure.

To answer your question though, it is as you asked, dump the db, tar/zip everything up, un tar/zip on the new host, dump the db into the new db, edit the config file for the db info and you should be all set.

If you manually tar the files up, use the -p switch to retain file permissions if it doesnt do it for you automatically.

tar -czfp - tar.gz
tar -cjfp - tar.bz2
Reply With Quote
  #4  
Old 03-10-2008, 10:44 AM
webspawner webspawner is offline
 
Join Date: Dec 2007
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was going to backup via FTP (just downloading the files)

Do you think so logging in via ssh would be the best way to go?

What would be the full command to zip them via SSH to retain the permissions?

any idea's?

Cheers,
Reply With Quote
  #5  
Old 03-10-2008, 12:32 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Backing up thru ssh would be a lot faster for you, also as you have ssh access, you can simply ftp thru ssh and send the files directly to the new server.

As far as ssh commands go, if you do not know ssh commands very well, the tar commands might not help you much if you do not know how to use the rest of hte ssh commands, like cd'ing to the right directories etc

tar -cjfp directory-name.bz2 /path/to/directory

That will compress the entire directory for you, so yo ucan tar the entire public_html in one shot.
Reply With Quote
  #6  
Old 03-10-2008, 01:37 PM
webspawner webspawner is offline
 
Join Date: Dec 2007
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, and that command retains the correct file permissions?

So I should do that, then download the tar'd file with FTP and then reupload the tar'd file to new server.

How would I then extract this?

Thanks for your help!
Reply With Quote
  #7  
Old 03-10-2008, 02:32 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In ssh type tar --help

c = compress
x = uncompress
p = retain file permissions

In ssh, type ftp ipaddy and hit return on the keyboard, enter the login info and hit return, then do the following

bin
put
local filename = filename u tar'd
remote filename = same name as above

and it will ftp everything for you server to server, no need to dl it and then re-upload it.
Reply With Quote
  #8  
Old 03-18-2008, 11:41 PM
webspawner webspawner is offline
 
Join Date: Dec 2007
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cd to the htdocs and type in:

[domainXXXXXX@ssh-server htdocs]$ tar -cjfp sitebackup.bz2 /full/path/to/folder/htdocs
tar: sitebackup.bz2: Cannot stat: No such file or directory
tar: Removing leading `/' from member names
tar: /full/path/to/folder/htdocs/p: file changed as we read it
tar: Error exit delayed from previous errors

Any idea's why this is happening :S

could I try anything else?

I have my database backed up (and did that via ssh- im not a noob with it but unsure what to try next)

any idea?s

thanks

PS: also when i do the command:

tar -cjfp backup.bz2

It returns as though it has been successful and when I check files in htdocs it is there but at 0kb
Reply With Quote
  #9  
Old 03-19-2008, 05:22 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Goto a temporary backup directory (not in htdocs!) and type this command:
Code:
tar -cvzf sitebackup.tar.gz /path/to/htdocs
Reply With Quote
  #10  
Old 03-19-2008, 06:24 AM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This error is why you cant back it up:

tar: /full/path/to/folder/htdocs/p: file changed as we read it

I would guess your in a directory or in the same and you have something there that is writting to a file as your try and compress everything, you will need to use an exclude switch in the command to exclude it.

The command you used is fine, there is no need to change to tar.gz as bz2 will do better compression and still use the p in the command to force it to keep the permissions/ownership intact.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:25 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04209 seconds
  • Memory Usage 2,252KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete