Jump to content


- - - - -

Setting up a cron for rsync on a non conformant port


  • You cannot reply to this topic
3 replies to this topic

#1 mudmanc4

    TMN Seasoned Veteran

  • Moderators
  • 9,040 posts
  • Location: In The Plex

Posted 14 January 2012 - 03:19 PM

I've been mirroring files from a remote server to a local server, always always have a backup. Using the following

rsync -avz -e 'ssh -p xxxx' user@server1.com:/var/ /var

Typing it in is not an issue, if i remember to do it every few days.

I know I need a key to allow the cron access , or not ask for a password each time defeating the automated process. Iv'e made my key on the local server and tried uploading it to the remote server

scp /root/rsync/key.pub user@server1.com:/root

Which fails due to not being on port 22

So thats actually where I'm stuck. I know I need to specify the proper port , and have tried several things but it always fails, I'm obviously not getting it right.
Vote 2012 !
Posted Image Posted Image

So how's everybody doing in that little head of yours ? ™

#2 mudmanc4

    TMN Seasoned Veteran

  • Moderators
  • 9,040 posts
  • Location: In The Plex

Posted 15 January 2012 - 11:19 AM

Solution =   -P  not -p

Upper case -P port specification.

Seems after all the most simple solution is hidden in Plain view.
Vote 2012 !
Posted Image Posted Image

So how's everybody doing in that little head of yours ? ™

#3 TriRan

    TMN Friend

  • Moderators
  • 937 posts
  • Location: Arizona

Posted 15 January 2012 - 12:51 PM

View Postmudmanc4, on 15 January 2012 - 11:19 AM, said:

Solution =   -P  not -p

Upper case -P port specification.

Seems after all the most simple solution is hidden in Plain view.

Isn't that always how it is??
CPU: AMD Phenom™II X4 955 BE Processor - 4.1GHz | MB: ASUS M4A785TD-V EVO 785G
RAM: Wintec XMP1600 DDR3 - 8.00GB @ 1600MHz | Video Card: Sapphire HD Radeon (Cypress XT) 5870 2GB | HDD0-3: 1.8TB
Network: Realtek 1Gb Ethernet, Asus 1Gb Switch, D-Link DIR-655, Motorola SB 6120
Posted Image
Posted Image

#4 mudmanc4

    TMN Seasoned Veteran

  • Moderators
  • 9,040 posts
  • Location: In The Plex

Posted 15 January 2012 - 01:55 PM

View PostTriRan, on 15 January 2012 - 12:51 PM, said:

Isn't that always how it is??
With me it is. I'm always looking deeper into what I may have borked . You would think i might learn to just take a step back and look at the surface.

Everything running as it should. Iv'e set up a local snap server using rsnapshot. Now to redo it all on that 1650 running raid 1 mirror, and include the entire server with databases.
Vote 2012 !
Posted Image Posted Image

So how's everybody doing in that little head of yours ? ™





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users