LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 05-16-2015, 07:23 PM   #1
HardenedCriminal
Member
 
Registered: May 2015
Posts: 104

Rep: Reputation: Disabled
auto backup with rsync


IF someone has already solved this please point in right direction. I could find in a search.

This works great but you have to login to the computer remotely to make it work. I would like to CRON the whole thing. I have never been able to find a fix. Thanks to all. (Shared keys have never worked on these boxes.)

---------------------------
IPREMOTE=`host XXXXX.homelinux.com |awk '{print $4}'`
export IPREMOTE
echo Remote: ${IPREMOTE}

expect -c 'spawn rsync -vaz /home/iscuser1/ -e ssh user1@$::env(IPREMOTE):/home/user1/backup/ ; expect a password ; send "12345678\n" ; interact'
 
Old 05-17-2015, 02:07 PM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Using shared keys is the solution for unattended rsyncs. So why did they "never work"?

jlinkels
 
1 members found this post helpful.
Old 05-17-2015, 02:09 PM   #3
HardenedCriminal
Member
 
Registered: May 2015
Posts: 104

Original Poster
Rep: Reputation: Disabled
2 of us tried and notta. I am hatchet programmer, the other guy expert. Even trying to 2 different boxes.
 
Old 05-18-2015, 07:25 AM   #4
Danelectro
LQ Newbie
 
Registered: May 2015
Location: France
Distribution: Debian 7/8, Raspbian, Redhat 6/7
Posts: 4

Rep: Reputation: Disabled
What did you do exactly? A simple ssh-keygen then ssh-copy-id user@remote-host should work.
Then : rsync user@remote:/path/to/source /path/to/backup or rsync /path/to/source user@remote:/path/to/backup.
Just be careful that you setup the cron with the same user.
 
Old 05-18-2015, 08:35 AM   #5
HardenedCriminal
Member
 
Registered: May 2015
Posts: 104

Original Poster
Rep: Reputation: Disabled
I can't remember what we did but the key exchange did NOT work; so I need a different approach.
 
Old 05-18-2015, 09:59 AM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by HardenedCriminal View Post
the key exchange did NOT work; so I need a different approach.
The "expert" needs to figure out why.
Once he does that, your "approach" becomes that much more robust.
 
Old 05-18-2015, 11:43 AM   #7
HardenedCriminal
Member
 
Registered: May 2015
Posts: 104

Original Poster
Rep: Reputation: Disabled
Thanks but no help.
 
Old 05-18-2015, 12:28 PM   #8
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Five Minutes to a More Secure SSH
Surely, your "expert" can dedicate 5m to the solution?

Just think, he'll fix the problem and you'll have a lot less coding to do.

I'm done here. Trying to beg you to have your 'expert' fix ssh using keys, and what you expect from this post,
isn't going to end well.

Last edited by Habitual; 05-18-2015 at 12:30 PM.
 
1 members found this post helpful.
Old 05-18-2015, 09:16 PM   #9
Beryllos
Member
 
Registered: Apr 2013
Location: Massachusetts
Distribution: Debian
Posts: 529

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Quote:
Originally Posted by HardenedCriminal View Post
I can't remember what we did but the key exchange did NOT work; so I need a different approach.
It doesn't work for you, but other people get it to work all the time. Which response is more likely to work?
(A) Figure out what you are doing wrong.
or
(B) Try something completely different.
When I was a Linux newbie, I got it to work. It's not that hard. Keep at it. You'll be glad you did.

Last edited by Beryllos; 05-18-2015 at 09:24 PM.
 
1 members found this post helpful.
Old 06-26-2015, 09:17 PM   #10
HardenedCriminal
Member
 
Registered: May 2015
Posts: 104

Original Poster
Rep: Reputation: Disabled
Removed message.

Last edited by HardenedCriminal; 06-27-2015 at 09:35 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Rsync Backup for Windows, Linux Knoppix, and Other Smart Technologies in Handy Backup by Novos LXer Syndicated Linux News 0 12-24-2011 12:43 PM
LXer: Backup with rsync and rsync.net LXer Syndicated Linux News 0 09-14-2010 05:20 PM
Using RSync to backup a secondary off-site backup server pezdspencer Linux - Software 4 06-29-2007 04:40 PM
Using rsync to backup data. Best way to backup folders? Micro420 Linux - General 2 11-23-2006 02:13 AM
auto ssh, and the rsync Swakoo Linux - Networking 5 08-25-2005 07:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration