LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 09-29-2012, 03:36 AM   #1
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Rep: Reputation: 32
dump | restore root to live partition?


I would like to migrate a FreeBSD server to a VPS, and I am wondering whether it is possible to move root to a live partition, doing something like this:
Code:
dump -0uanL -f - /dev/sd0s1a | ssh user@0.0.0.0 "restore rf -"
Since it is a VPS, I have no way of taking the root partition of the target system offline.

Obviously, before rebooting, I would need to configure /etc/fstab and /etc/rc.conf for the new host.

Would this work?
 
Old 09-29-2012, 07:56 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213
Sounds to me like a recipe for major filesystem corruption and crash of the target system.
 
Old 10-02-2012, 03:24 PM   #3
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Original Poster
Rep: Reputation: 32
OK, I am sure you right. Just thought I'd ask.

Perhaps there is a way of creating a separate partition on a VPS, restoring thd dump image to that, and booting from it. I will investigate further.
 
Old 10-02-2012, 08:40 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213
With LVM you could probably do it by creating a snapshot, reconfiguring to boot from the snapshot, doing the restore to the origin volume, then making the necessary adjustments there for the new host and booting from the origin volume. Not the sort of thing I'd want to try on a machine much more than an arm's length away, though, and you'd have to be already using LVM to do it.
 
Old 10-03-2012, 01:38 AM   #5
fbsduser
Member
 
Registered: Oct 2009
Distribution: Hackintosh, SlackWare
Posts: 267

Rep: Reputation: 30
Quote:
Originally Posted by rknichols View Post
With LVM you could probably do it by creating a snapshot, reconfiguring to boot from the snapshot, doing the restore to the origin volume, then making the necessary adjustments there for the new host and booting from the origin volume. Not the sort of thing I'd want to try on a machine much more than an arm's length away, though, and you'd have to be already using LVM to do it.
I don't know if he will be able to use LVM (since it's a Linux-centric feature and he's using a BSD system). He will get what he requires by using the zfs filesystem, since it does snapshots (and a lot more), and BSD supports it.
 
Old 10-03-2012, 09:23 AM   #6
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,780

Rep: Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213Reputation: 2213
Quote:
Originally Posted by fbsduser View Post
I don't know if he will be able to use LVM (since it's a Linux-centric feature and he's using a BSD system).
Apparently NetBSD has an implementation of LVM. Don't know what BSD variant the OP might be using.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
migrate a partition using dump and restore cccc *BSD 2 04-08-2012 05:52 PM
[SOLVED] Live Resize Root Partition Centos vzxen Linux - Software 5 06-05-2011 05:11 AM
Restore MySQL Dump File But I want it to restore with different names? helptonewbie Linux - Newbie 5 07-08-2009 05:09 AM
dump and restore ChrisAbela Slackware 0 05-08-2008 08:15 AM
dump/restore moger Linux - Software 4 12-31-2002 04:34 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 04:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration