What if you need to migrate an existing directory like /usr/local?
cpio -pdum to copy /usr/local to the /mnt directory. Edit the /etc/fstab(5) file to show that the /usr/local partition is now /dev/sd2d (your freshly formatted partition). Example: /dev/sd2d /usr/local ffs rw 1 1 Reboot into single user mode with boot -s, move the existing /usr/local to /usr/local-backup (or delete it if you feel lucky) and create an empty directory /usr/local. Then reboot the system, and voila, the files are there!
Related Questions
- Migrate your existing Workflow user information to Oracle Internet Directory. See: How can I access existing user information after integrating with Oracle Internet Directory?
- What if you need to migrate an existing directory like /usr/local?
- Can Rush be installed in a directory other than /usr/local/rush?