LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-14-2022, 09:42 AM   #1
disk_bearing
Member
 
Registered: Mar 2022
Posts: 37
Blog Entries: 2

Rep: Reputation: 2
Question rsync "failed: invalid argument (22)"


I am manually backing up my main personal folder using rsync.
When rsync from Fedora to an ext3 external drive, no trouble.

When rsync from Fedora to FAT, two dozen files gave me this error.
Example:
Code:
.../car idling source/.The biggest winter energy myth.odt.cmxA6y" failed: Invalid argument (22)
When I checked, the files don't have that weird extension. They are mostly pdf printed from Firefox and odt.

This post says it is a permission issue. I don't know enough to tweak permissions. So my question is, why did these files get this property, and how can I avoid it in the future?

Thank you!!
 
Old 06-14-2022, 10:44 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,685

Rep: Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714
Quote:
Originally Posted by disk_bearing View Post
I am manually backing up my main personal folder using rsync.
When rsync from Fedora to an ext3 external drive, no trouble.

When rsync from Fedora to FAT, two dozen files gave me this error.
Example:
Code:
.../car idling source/.The biggest winter energy myth.odt.cmxA6y" failed: Invalid argument (22)
When I checked, the files don't have that weird extension. They are mostly pdf printed from Firefox and odt.

This post says it is a permission issue. I don't know enough to tweak permissions. So my question is, why did these files get this property, and how can I avoid it in the future?

Thank you!!
There are multiple possible causes for that error. Can you provide the rsync command line you used?
Doing so shoudl make enough of the issue clear that we can make a better determination.
 
1 members found this post helpful.
Old 06-14-2022, 03:19 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,750

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
Quote:
/car idling source/.The biggest winter energy myth.odt.cmxA6y"
libreoffice creates a hidden temp file when you open a document and should delete it when closed. Looks like you have a straggling file.

rsync wants to change permission on the destination like the source but since permissions between linux and FAT file systems are not compatible it fails.

This is why rsync works when using an ext3 file system as the destination.

As posted knowing what options you are using will help. One thing to note is that -a i.e. archive mode equals -rlptgoD (no -H,-A,-X) and p = permissions.
 
2 members found this post helpful.
Old 06-15-2022, 04:38 PM   #4
disk_bearing
Member
 
Registered: Mar 2022
Posts: 37

Original Poster
Blog Entries: 2

Rep: Reputation: 2
Quote:
rsync -ra --info=progress2
Just something equivalent to a no frills file browser drag-and-drop.

thank you for your insights, I will remember to include the command in the future.

Dang straggling files, I still have some refuse left from Mac OS.
However, my hidden files are visible and I don't see that extension anywhere. The extension is also there on the PDFs printed on Firefox. I'm guessing that extension is for an rsync temp file.

Maybe I could use an option to strip permissions until I learn them better.
 
Old 06-16-2022, 09:40 AM   #5
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,685

Rep: Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714
When you show us a command it really helps if you show us the ENTIRE command, that one has no source or target and would error due to the missing elements. I am sure that was not your real command line.

We may not need it.
I have reviewed the evidence and situation again, and have this advice: use something like tar that preserves the permissions even if you use a target tar file on a fat volume, for your backups. (or use a true backup tool, that takes these things into account.) The rsync error is likely to be, as michaelk mentioned, due to rsync trying to replicate the *nix permissions on a FAT target where they are not supported. Therefor it appears that you see the error because you are using the wrong tool, or using it in a situation where your expectations are not supported.

IF the permissions are of no importance, you could just ignore the errors. In that case you cannot expect the files to restore to a *nix file system (Ext2/3/4, XFS, BTRFS, etc) with the original permissions. If that is not a problem, this may still be an workable solution. If the ownership and permissions matter, then you need a different solution.
 
1 members found this post helpful.
Old 06-16-2022, 12:45 PM   #6
disk_bearing
Member
 
Registered: Mar 2022
Posts: 37

Original Poster
Blog Entries: 2

Rep: Reputation: 2
Oh of course, wish I had thought of the ENTIRE command. Thanks again for the insight and here it is.

[user@fedora ~]$ rsync -ra --info=progress2 '/home/user/_personal' '/run/media/user/FAT_01_user/_personal/_d20220613_personal_backup'

I will study Tar. If I archive a directory that has files with weird permissions, and extract them into a different filesystem, wouldn't tar refuse to copy them? If not I would expect the issue to recur during a later rsync.

Maybe I should just accept that filesystem conversions are lossy.
 
Old 06-16-2022, 12:51 PM   #7
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,333
Blog Entries: 3

Rep: Reputation: 3727Reputation: 3727Reputation: 3727Reputation: 3727Reputation: 3727Reputation: 3727Reputation: 3727Reputation: 3727Reputation: 3727Reputation: 3727Reputation: 3727
It looks like you're missing the / on the destination directory. rsync behaves very differently if the slashes are missing from directory names.

Also the -r is redundant when combined with -a because the -a covers -r -l -p -t -g -o and -D. You might wish to add a -v though.
 
1 members found this post helpful.
Old 06-16-2022, 01:02 PM   #8
disk_bearing
Member
 
Registered: Mar 2022
Posts: 37

Original Poster
Blog Entries: 2

Rep: Reputation: 2
Quote:
Originally Posted by Turbocapitalist View Post
It looks like you're missing the / on the destination directory. rsync behaves very differently if the slashes are missing from directory names.
That's surprising because I got that from dragging it in from Nautilus. Is there some special purpose between the inclusion or exclusion of a slash?

Quote:
Originally Posted by Turbocapitalist View Post
Also the -r is redundant when combined with -a because the -a covers -r -l -p -t -g -o and -D. You might wish to add a -v though.
Good to know! I may never use -v anymore now that there's --info=progress2. The progress % is very inaccurate but it tells me that it's working, and it only prints out the errors, which is more important than the successes.
 
Old 06-16-2022, 10:23 PM   #9
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,685

Rep: Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714Reputation: 2714
I believe the rsync man page on my Manjaro install contains examples and a description of the meaning and effects of the trailing '/' for the source and target cases.
 
1 members found this post helpful.
  


Reply



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
Httpd: "Invalid argument: alloc_listener: failed to get a socket for (null)" nirox Slackware 10 07-22-2012 03:13 PM
Command failed: device-mapper: reload ioctl failed: Invalid argument azza Programming 2 01-10-2011 03:16 AM
[SOLVED] "WARNING: Re-reading the partition table failed with error 22: Invalid argument." ytd Linux - Newbie 6 01-26-2010 10:06 AM
message sending failed : Error[22 ] invalid argument .....but each and every argument rakeshranjanjha Linux - Software 2 01-07-2008 11:22 PM
alsa mixer sayin "function snd_mixer_load failed:invalid argument" callmeleroi Fedora 0 03-11-2007 09:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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