Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You should be sure to preserve the file permissions when copying. With cp it is the option -p, for rsync I would use -a. You can also use the tar-command.
No, if you copy over the network you need a SSH-daemon running, AFAIK. Will also work with rsync-daemon (keep the different syntax in mind), don't know about SFTP.
What actually do you want to copy? If you want to copy a whole system I would recommend to do this from a live-CD/USB, if you just want to copy one data partition to a different partition then no.
1. Use rsync while the system is running in the normal runlevel. Logout all users first and do that from the root account so that the data in /home will not be altered during the copy. Just for safety.
2. this makes no sense, why would you copy the /-partition to the /boot-partition? If you mean /new_root instead of /new_boot the do it from a live-medium, the system should not be running.
If rhe system is running you will have many files that may change, like log-files or a running database. Therefore it is recommended to copy from a not running system to avoid inconsistencies. It is not a necessity, but recommended. You cam also do it from a running system when you exclude such files and the files generated from a running kernel like the /proc and /sys trees.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.