LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-23-2017, 10:19 PM   #1
kekie
LQ Newbie
 
Registered: Sep 2017
Distribution: ubuntu+xfce
Posts: 7

Rep: Reputation: Disabled
Question [SOLVED] Mysterious rsync error


I'm trying to create a mirror of my home dir to a remote machine over ssh using rsync. I'm getting these errors:

Code:
rsync: Failed to exec lete: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.1]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(226) [sender=3.1.1]
Code:
dmesg | tail
just gives me some stuff about my keyboard being plugged in. I can post logs if they would be useful.
Both machines are ubuntu linux, and I'm using ssh keys.
I'm using the -c and -delete options w/ rsync.

Anyone know what's with this error? Failing that, anyone have any advice for creating this kind of backup? I'm using rsync since it's got that delta transfer algorithm, which sounds perfect for my slow connection.

Last edited by kekie; 10-05-2017 at 07:58 PM.
 
Old 09-23-2017, 11:13 PM   #2
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 699

Rep: Reputation: 151Reputation: 151
Could you let us know the actual rsync command pls?

Cheers
 
1 members found this post helpful.
Old 09-23-2017, 11:17 PM   #3
kekie
LQ Newbie
 
Registered: Sep 2017
Distribution: ubuntu+xfce
Posts: 7

Original Poster
Rep: Reputation: Disabled
It was rsync -c -delete /home/kekie/ kekie@remote:/path/to/backup/dir
 
Old 09-23-2017, 11:32 PM   #4
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 699

Rep: Reputation: 151Reputation: 151
Got it
Quote:
[tim@eraserhead ~]$ rsync -c -delete /home/tim/ tim@192.193.294.195:/home/tim/xyz
rsync: Failed to exec lete: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.2]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(226) [sender=3.1.2]
Quote:
[tim@eraserhead ~]$ rsync -c --delete /home/tim/ tim@192.193.294.195:/home/tim/xyz
rsync: --delete does not work without --recursive (-r) or --dirs (-d).
rsync error: syntax or usage error (code 1) at main.c(1567) [client=3.1.2]
Quote:
[tim@eraserhead ~]$ rsync -c --delete -r /home/tim/ tim@192.193.294.195:/home/tim/xyz
You need 2 dashes before delete:

Quote:
--delete
To get over the recursive error use -r
 
1 members found this post helpful.
Old 09-23-2017, 11:46 PM   #5
kekie
LQ Newbie
 
Registered: Sep 2017
Distribution: ubuntu+xfce
Posts: 7

Original Poster
Rep: Reputation: Disabled
Good stuff! What an odd error, I would have expected an 'invalid option -delete'
I'm making progress, now I'm getting a "permission denied (publickey)" I'm trying to figure out how to specify an identity file to rsync like you do with ssh...
 
Old 09-23-2017, 11:53 PM   #6
kekie
LQ Newbie
 
Registered: Sep 2017
Distribution: ubuntu+xfce
Posts: 7

Original Poster
Rep: Reputation: Disabled
There we go, adding this option fixed they key error:
Code:
-e "ssh -i /path/to/private/key"
It's all working now. I'm just an amateur, maybe some wizard here can tell me if running this command periodically is a good way to back up my home directory. Are there better ways?

Last edited by kekie; 09-23-2017 at 11:53 PM. Reason: typo
 
Old 09-24-2017, 02:37 AM   #7
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 699

Rep: Reputation: 151Reputation: 151
In my opinion you are on the right track. I use this method to back up a number of PCs to my server (which is in turn backed up). If you lose a disk or when you upgrade you have a perfect snapshot of where you were. Maybe other people could contribute but I have a few custom tools set up so I also back up.

Quote:
usr/local/sbin
/usr/share/applications
as well as fstab. Nice to be able to just pick up where I left off when trouble comes calling
 
Old 09-25-2017, 01:24 AM   #8
Beryllos
Member
 
Registered: Apr 2013
Location: Massachusetts
Distribution: Debian
Posts: 525

Rep: Reputation: 317Reputation: 317Reputation: 317Reputation: 317
Quote:
Originally Posted by kekie View Post
... It's all working now. I'm just an amateur, maybe some wizard here can tell me if running this command periodically is a good way to back up my home directory. Are there better ways?
Looks good so far. A reasonable next step might be to keep incremental backups. That way, you can recover modified or deleted files from prior backups. To do this with rsync, create a new backup directory on the destination and use the --link-dest option to link it to the old backup directory. To save disk space, the destination file system must be a type that supports hard links (for this I have used ext3 or ext4). If the destination file system doesn't support hard links, rsync with --link-dest will simply save another full backup, same as if you hadn't used --link-dest.

Example: if you created an initial backup by this command:
Code:
rsync -cr --delete /home/kekie/ kekie@remote:/path/to/first/backup/
then you could create an incremental backup by the following command:
Code:
rsync -cr --link-dest=/path/to/first/backup /home/kekie/ kekie@remote:/path/to/second/backup/
The --delete option is irrelevant when you create a new backup directory (nothing there to delete).

Long ago, I developed a bash script based on this idea. It worked fine, and it was educational and fun to write it. I would be glad to advise you on that. However, if you just want to get the backup done, there are backup packages that use rsync behind a nice GUI. Search the web for "backup for linux" if you are interested in that.
 
1 members found this post helpful.
Old 09-25-2017, 08:05 AM   #9
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,446

Rep: Reputation: 2035Reputation: 2035Reputation: 2035Reputation: 2035Reputation: 2035Reputation: 2035Reputation: 2035Reputation: 2035Reputation: 2035Reputation: 2035Reputation: 2035
Quote:
Originally Posted by kekie View Post
Good stuff! What an odd error, I would have expected an 'invalid option -delete'
It parses as "-d -e lete". That's a flag "-d" that takes no argument followed by a flag "-e" that takes the rest of the string as its argument.
 
1 members found this post helpful.
Old 09-25-2017, 11:47 AM   #10
kekie
LQ Newbie
 
Registered: Sep 2017
Distribution: ubuntu+xfce
Posts: 7

Original Poster
Rep: Reputation: Disabled
@rknichols: I see, that makes more sense, thanks!
@Beryllos: I was originally planning on just copying the mirror folder and mirroring to the copy to make incremental backups, but that would waste disk space, as you mentioned. I didn't know rsync had this functionality, thanks!
 
  


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
Rsync error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6] jjrowan Linux - Security 1 05-14-2017 10:55 AM
rsync error: error in rsync protocol data stream (code 12) at token.c(288) sagar alias jacky Linux - General 3 02-05-2014 01:05 PM
rsync giving ld.so.1: rsync: fatal: libiconv.so.2: open failed: error SunilEA Linux - Newbie 1 01-10-2014 01:24 PM
Mysterious 403 error intramaweb Linux - Software 4 06-01-2006 05:42 PM
Mysterious Error lucky6969b Programming 7 03-20-2006 07:39 PM

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

All times are GMT -5. The time now is 05:28 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