LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (http://www.linuxquestions.org/questions/%2Absd-17/)
-   -   dump | restore root to live partition? (http://www.linuxquestions.org/questions/%2Absd-17/dump-%7C-restore-root-to-live-partition-4175429553/)

Kropotkin 09-29-2012 03:36 AM

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?

rknichols 09-29-2012 07:56 PM

Sounds to me like a recipe for major filesystem corruption and crash of the target system.

Kropotkin 10-02-2012 03:24 PM

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.

rknichols 10-02-2012 08:40 PM

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.

fbsduser 10-03-2012 01:38 AM

Quote:

Originally Posted by rknichols (Post 4795549)
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.

rknichols 10-03-2012 09:23 AM

Quote:

Originally Posted by fbsduser (Post 4795704)
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.


All times are GMT -5. The time now is 09:06 PM.