DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 13th July 2008
cwhitmore cwhitmore is offline
Port Guard
 
Join Date: May 2008
Posts: 27
Default Moving FreeBSD to new PC?

I'm currently running my site on an old Dell Dimension and would like to move all the programs, settings, etc. to another Dell PC.
Which imaging software is best for this? I've used Acronis on Windows images, but if you move the image onto dissimilar hardware it blows up. Does FreeBSD have the same problem? If not imaging, what is the best way to do this?
Reply With Quote
  #2   (View Single Post)  
Old 13th July 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

dump and restore

example on dump, can be found in my post here
http://daemonforums.org/showthread.php?t=1348
for restore you need some /tmp space (just saying for you to know, i was fucking for few hours, before i found out why, i can't restore my system)
Reply With Quote
  #3   (View Single Post)  
Old 13th July 2008
cajunman4life cajunman4life is offline
Real Name: Aaron Graves
Package Pilot
 
Join Date: May 2008
Location: Coolidge, Arizona
Posts: 203
Default

Last time I did such an animal, I used tar + gzip (really slow when you have 2G+ data on /usr), did a fresh install on the new system, then extracted all the .tgz archives, and a reboot. Done.

Dump is probably better though. I must have been drinking too much when I thought tar would be a good idea.
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident!
Reply With Quote
  #4   (View Single Post)  
Old 14th July 2008
cwhitmore cwhitmore is offline
Port Guard
 
Join Date: May 2008
Posts: 27
Default

Thanks or the information. If I use dump what is the best way to transfer those files over to the new PC? Should I setup NFS or FTP?
Reply With Quote
  #5   (View Single Post)  
Old 14th July 2008
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Quote:
Last time I did such an animal, I used tar + gzip (really slow when you have 2G+ data on /usr), did a fresh install on the new system, then extracted all the .tgz archives, and a reboot. Done.
While this works, please note that this will also copy all the hard links, such as /rescue, most stuff in there are hard links to /recue/rescue.
There are other hard links too, such as /bin/csh and /bin/tcsh.

Quote:
If I use dump what is the best way to transfer those files over to the new PC? Should I setup NFS or FTP?
Either will work fine.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #6   (View Single Post)  
Old 14th July 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

take a look at dump and restore man page, as i remember they have something mentioned about sending files over net....
take a look at man anyway.... it's pretty useful
Reply With Quote
  #7   (View Single Post)  
Old 14th July 2008
DrJ DrJ is offline
ISO Quartermaster
 
Join Date: Apr 2008
Location: Gold Country, CA
Posts: 507
Default

Quote:
Originally Posted by cwhitmore View Post
I'm currently running my site on an old Dell Dimension and would like to move all the programs, settings, etc. to another Dell PC.
Just plug the old disk into the new computer. Nothing else is required.
Reply With Quote
  #8   (View Single Post)  
Old 14th July 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Personally I think DrJs advice is best ;-)


And if you can't do that, you can always hook up the target machines drive to your current Dell, mount it and transfer data. Dump and restore makes life really easy, well worth learning them.


@killasmurf I knew I must've been nuts when I made /tmp only 512mb instead of my usual 15gb.....
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #9   (View Single Post)  
Old 14th July 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

Quote:
Originally Posted by DrJ View Post
Just plug the old disk into the new computer. Nothing else is required.
He will need do reconfigure custom kernel....
Reply With Quote
Old 14th July 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

Quote:
Originally Posted by TerryP View Post
@killasmurf I knew I must've been nuts when I made /tmp only 512mb instead of my usual 15gb.....
15GB wooooh..... i have about 380+- MB for war, where tmp are



sorry for 2x posts
Reply With Quote
Old 14th July 2008
DrJ DrJ is offline
ISO Quartermaster
 
Join Date: Apr 2008
Location: Gold Country, CA
Posts: 507
Default

Quote:
Originally Posted by killasmurf View Post
He will need do reconfigure custom kernel....
Depends. I have moved disks that had custom kernels between and they worked fine. As long as you have the appropriate device drivers it usually works fine. Of course they have to use the same basic architecture.

Rather than copy the disk itself, I would set up the new system, install FreeBSD and make sure that works. Then I'd copy over the config files, followed by use of rsync to move the rest of the stuff over. It works pretty well.

Last edited by DrJ; 14th July 2008 at 02:46 PM.
Reply With Quote
Old 14th July 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

You can always install GENERIC before pulling the drive.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
Old 16th July 2008
cwhitmore cwhitmore is offline
Port Guard
 
Join Date: May 2008
Posts: 27
Default

Okay, I got the dump command working and was able to backup /, /usr/ and /var individually on a USB flash drive. I mounted the USB on the new system, changed the directory so I was in / and then ran "restore rf /mnt/usb/backup", which ran fine. When I rebooted the new system it prompted me for the shell as if it couldn't find the hard drive. Does the backup of root also contain /dev info?
Reply With Quote
Old 16th July 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

No dev is created no boot....

was that filesystem you run restore new? (newfs'ed?), it must be

also make sure you restored other backups on correct slices....

Also if you are running single user mode it will ask for shell
Reply With Quote
Old 16th July 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

I believe under FreeBSD that /dev should be managed by the kernel and devfs.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Old 16th July 2008
cwhitmore cwhitmore is offline
Port Guard
 
Join Date: May 2008
Posts: 27
Default

Maybe it would be easier to explain what/why I'm backing up. I'm creating a secondary DNS for my remote offices. The ports that I've installed are perl5.8 and bind94. I can create a generic install of FreeBSD, but I want a quick and easy way to backup everything on the orginal system and restore it over. Can someone direct me on the restore syntax and KILLASMURF's suggestion of newfs?
thanks for all the help.
Reply With Quote
Old 16th July 2008
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
ISO Quartermaster
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 589
Default

you need empty slice
Code:
newfs -U /dev/SLICE
mount /dev/slice /mnt
cd /mnt
restore -rf /backup/file
#or if you have compressed backup with bzip2
bzcat /backup/file.bz2 | restore -rf -
OK, i go to sleep, if anything, i will answer tomorrow
Reply With Quote
Old 21st July 2008
cwhitmore cwhitmore is offline
Port Guard
 
Join Date: May 2008
Posts: 27
Default

Okay, I finally got everthing backed up on a usb drive. Now I'm trying to restore. If I restore over an existing FreeBSD install and reboot it asks me where the shell program exists. I tried downloading a live version of FreeBSD, but I can't get the CD to boot. How can I boot, mount the usb drive then restore without overwriting files that are open?
Reply With Quote
Old 21st July 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

I take you are getting the enter path to shell or press enter for /bin/sh kind of prompt ?


execute the shell and correct the problem, it should give you a clue on the messages from loader/kernel/init/rc during boot if anything is obviously wrong -- like fstab being fubar, etc


best I can think of with out more sleep...
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Old 21st July 2008
cwhitmore cwhitmore is offline
Port Guard
 
Join Date: May 2008
Posts: 27
Default

Yes, you're correct, it's asking for the path to shell. When I hit enter it doesn't give my a # prompt.
Looks like I need to restore the original fstab, but how can I do that if I can't get the shell to load?
Reply With Quote
Reply

Tags
clone ; cloning disk, imaging, machine, moving

Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving ZFS to a other pool? amscotti Solaris 1 28th July 2009 11:49 PM
Moving to ZFS Business_woman FreeBSD General 6 20th October 2008 03:28 PM
moving freebsd install to new drive carpman FreeBSD General 7 7th August 2008 06:09 PM
Moving files Weaseal Programming 2 14th July 2008 07:30 AM


All times are GMT. The time now is 10:46 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick