![]() |
|
OpenBSD Installation and Upgrading Installing and upgrading OpenBSD. |
![]() |
|
Thread Tools | Display Modes |
|
||||
![]()
On a secure network:
|
|
||||
![]()
Here's an example of a restore on a secure network, using ftp(1) to pipe the compressed dump data over the network and uncompress it before piping it into restore(8), Note: ftp transmits everything, including userid/password, without encryption.
# ftp -o - ftp://user@server/backup.file.gz | gunzip | restore -rf - Here's an example using SSH to pipe the compressed dump data over the network and uncompress it before piping it into restore(8) on an insecure network. The OS must be installed already. # ssh user@system "cat backup.file.gz" | gunzip | restore -rf - Last edited by jggimi; 31st August 2009 at 12:04 PM. Reason: Noticed a typo in the ftp command |
|
||||
![]()
Nice, potent little command suite!
I once saw a variant of this most-excellent approach that used an ultra-skinny bootable USB fob, then similar over-the-secured-net command sequences to effect a bare drive restore (whole system). I'll see if I can dig it out. /S
__________________
Never argue with an idiot. They will bring you down to their level and beat you with experience. ![]() |
|
||||
![]()
On a secure network:
1. Boot bsd.rd bsd.rd boot 2. Recreate MBR fdisk -iy wd0 3. Recreate Disklabel disklabel -E wd0 4. Start networkOn a secure network: ifconfig xl0 192.168.0.4 netmask 255.255.255.0 1. newfs(8) newfs wd0a 2. mount(8) mount /dev/wd0a /mnt 3. cd(1) into filesystem cd /mnt 4. make a temp directory for restore (/tmp isn't big enough) mkdir /mnt/temp 5. set TMPDIR to point to that temp directory export TMPDIR=/mnt/temp 6. Pipe backup file into restore(8) # ftp -o - ftp://user@server/backup.file.gz | gunzip | restore -rf - 7. remove the temp directory and the restoresymtable file in the top level directory. rm -rf /mnt/temp 8. Finally make the root drive bootable cp /usr/mdec/boot /mnt/root /usr/mdec/installboot -v /mnt/root /usr/mdec/biosboot wd0 Last edited by revzalot; 2nd September 2009 at 04:30 PM. Reason: Added final step. |
|
||||
![]()
Ok one more scenario that popped up. I upgraded to -stable and did full level 0 dump on all my paritions but somehow my root.dmp file got erased mysteriously. Can I just install a new system, upgrade to -stable and finally restore all my dump files without the original root.dmp file?
|
|
||||
![]()
I don't understand your exact state. If you're just practicing, then dump your root partition again, or, recover it from /altroot if you use that.
A new system install will create an entire hierarchy, including /usr and /var. Depending on your specific filesystems that include OS-related files of all kinds, you could easily get out-of-sync without a great deal of care. For example, packages usually place files in /usr/local and in /var, but they are not restricted to those, many put configuration files in /etc. In addition, the installed-package database is stored in /var/db/pkg/*, and needs to be kept in sync with /etc, /usr/local, and other /var components that packages create. |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
FreeBSD backup/restore | graudeejs | Guides | 2 | 26th February 2010 06:40 AM |
Cannot connect to IRC (network issues within OBSD?) | guitarscn | OpenBSD General | 10 | 4th September 2009 12:35 PM |
Permission problems after restore | Crotalus | FreeBSD Installation and Upgrading | 3 | 5th February 2009 02:17 PM |
dat 72 one touch restore | firstkmh | FreeBSD General | 0 | 29th August 2008 03:46 PM |
obsd 4.3 secure ssh use | milo974 | OpenBSD Security | 9 | 3rd July 2008 11:23 AM |