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.
Distribution: Fedora 7, Fedora 9, Solaris 10, Mac OS X, RHEL5
Posts: 71
Rep:
Why wont you try NFS?
It is simple, though i am not sure about cvs, so i assume your CVS repos are under some file system after all, and you have network connection.
I would install/enable NFS services, then publish the filesystem or directory (eg. /home ) and then, on the backup machine mount that directory or filesystem and copy (eg. mount 192.xxx.xxx.xxx:/home /server_machine_mountpoint).
That would make a transparent transfer wich you can make in the opposite way once you have to restore your data.
If you have physical access to the machines, and there are sufficient IDE/SCSI bus slots available, and don't mind doing it, one way is to rip the disk with all your data out of the original machine and install it in the new one. You can mount it in the place where you want to work, or if you prefer you can copy the files across. Using the cp command, you can use the -p option to preserve permissions and so on. Whether you copy or just use the old device, make sure the UIDs of the file owners/groups are the same on the old and new systems
Over a network you could use rsync. You just have to be able to ssh from one machine to the other. To preserve ownership of files and the like you'll need to be ssh to root on the destination machine.
An alternative to rsync is scp, which is probably more likely to be installed by default.
iirc, ssh is an option in rsync, not requirement. Otherwise I agree with matthewg42.
BTW geek_man, NFS makes files avail, but does not move them, so they'd get trashed when the old system was rebuilt.
The options are correct, but the order my not be. If you want to copy the host machine's /oldstuff/repo1 to the same path on box2, the command would be:
rsync -avz /oldstuff/repo1 box2:/usr/local/repo1
rsync expects the source to be first, and the dest to be second.
iirc, ssh is an option in rsync, not requirement. Otherwise I agree with matthewg42.
BTW geek_man, NFS makes files avail, but does not move them, so they'd get trashed when the old system was rebuilt.
Oops, you're right. It is possible to use rsh, remsh or other remote shells. Using rsh might actually be quicker if you have a fast network, as ssh can max out the CPU going the encryption/decryption if the throughput is very high.
I've successfully indoctrinated myself into considering rsh and friends "not an option" for security reasons... You're right though, and there are cases when it is better in some ways than ssh. Even so, the "don't use rsh, use ssh" mantra should still be repeated at every opportunity.
The options are correct, but the order my not be. If you want to copy the host machine's /oldstuff/repo1 to the same path on box2, the command would be:
rsync -avz /oldstuff/repo1 box2:/usr/local/repo1
rsync expects the source to be first, and the dest to be second.
Yeah, I noticed when I tried that I had to reverse the order.
I usually mention the ssh option, but wouldn't want people to believe that they HAVE to install/use ssh for rsync.
For internal txfrs, esp one-offs like this, I'd say it's overkill (probably)...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.