Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What if you need to migrate an existing directory like /usr/local?

0
Posted

What if you need to migrate an existing directory like /usr/local?

0

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

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.