Run aground trying to get my rsync server to login to my VPS as root!!
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Run aground trying to get my rsync server to login to my VPS as root!!
Hello I'm new here,
I am a windows user generally but have a solid Centos 5.5 VPS with WHM with a provider and have lightly dabbled in accessing it via putty, doing some basic stuff including rsyncing to some backup space provided by the host.
I thought however I'd use an old box to install Centos 6 to have a play with and use it as an Rsync backup box so I have my sites backed up on my premises as well.
My VPS is secure and I have to login as admin and su to root.
My Rsync script is as follows:
"rsync -r -a -v -e "ssh -l admin" xxx.xxx.xxx.xxx:/home/ /home/vpsbak", which logs in Ok as admin but gets permission denied when trying to read the /home directory. My slghlty helpful host has told me I need to set the conifg file rsyncd.conf to 'uid = root'.
I find this doesn't exist so create it with simply the above value added and 'read only = yes'.
However no change, I still get permission denied. I have been searching and searching and read about typing "rsync --config /etc/rsyncd.conf" but it's saying I need to add --daemon? I do this without error but the permission denied issue exists?
So confusing all this, I'd appreciate anyones help so much!
Rsync can run natively or tunnel through ssh, the format you're using (a single ':' between host and path) is over ssh. This means (in your case) that the account you connect with needs permissions on the source location and the account you're running as needs permissions on the target location, you could also propagate some ssh keys to login without a password. Your command can be simplified to:
I simply want to pull a backup of my VPS's home directory to the computer I am working on. I don't mind entering a password and doing this manually once a week. As mentioned I can only login with admin and if I login via putty directly to the server I have to sudo su root to read the files. I guess I'm trying to make Rsync do the same?
...#acl entry if supported by the filesystem
- add an acl to /home allowing admin to read the home directories
That would be my choice.
amdowney, presumably your filesystem is ext3 - in this case you'll need to mount it with 'acl' option (change /etc/fstab options entry for appropriate partition from 'defaults' to 'rw,acl'); then remount. Use 'setfacl' to set acl permissions - see 'man setfacl'.
Thanks guys but you know what the ACL entry thing is tampering with my source VPS again isn't it and I'd rather not. It's solid and despite being a confident windows man I feel back at square 1 or 2 at the minute with my linux skillset.
I'm happy to initiate this manually once a week (I have Rsync and R1soft backups running daily with the host) so it looks like the simplest way is to SSH into the VPS and sudo root then initiate Rsync from there back to my PC isn't it.
Not sure what my host was thinking though when he said I could setup my rsync server and configure the rsyncd.conf to make this work despite being unable to login as root. I guess he must have thought I was doing it from my VPS...
Another quick question though, My 120Gb HDD has been split into 2 volumes it seems, root and home as well as a smaller one for boot. If I need to backup over 50gb (the space of the 2 larger partitions) can I enlarge one easily?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.