No Stupid Questions
No such thing. Ask away!
!nostupidquestions is a community dedicated to being helpful and answering each others' questions on various topics.
The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:
Rules (interactive)
Rule 1- All posts must be legitimate questions. All post titles must include a question.
All posts must be legitimate questions, and all post titles must include a question. Questions that are joke or trolling questions, memes, song lyrics as title, etc. are not allowed here. See Rule 6 for all exceptions.
Rule 2- Your question subject cannot be illegal or NSFW material.
Your question subject cannot be illegal or NSFW material. You will be warned first, banned second.
Rule 3- Do not seek mental, medical and professional help here.
Do not seek mental, medical and professional help here. Breaking this rule will not get you or your post removed, but it will put you at risk, and possibly in danger.
Rule 4- No self promotion or upvote-farming of any kind.
That's it.
Rule 5- No baiting or sealioning or promoting an agenda.
Questions which, instead of being of an innocuous nature, are specifically intended (based on reports and in the opinion of our crack moderation team) to bait users into ideological wars on charged political topics will be removed and the authors warned - or banned - depending on severity.
Rule 6- Regarding META posts and joke questions.
Provided it is about the community itself, you may post non-question posts using the [META] tag on your post title.
On fridays, you are allowed to post meme and troll questions, on the condition that it's in text format only, and conforms with our other rules. These posts MUST include the [NSQ Friday] tag in their title.
If you post a serious question on friday and are looking only for legitimate answers, then please include the [Serious] tag on your post. Irrelevant replies will then be removed by moderators.
Rule 7- You can't intentionally annoy, mock, or harass other members.
If you intentionally annoy, mock, harass, or discriminate against any individual member, you will be removed.
Likewise, if you are a member, sympathiser or a resemblant of a movement that is known to largely hate, mock, discriminate against, and/or want to take lives of a group of people, and you were provably vocal about your hate, then you will be banned on sight.
Rule 8- All comments should try to stay relevant to their parent content.
Rule 9- Reposts from other platforms are not allowed.
Let everyone have their own content.
Rule 10- Majority of bots aren't allowed to participate here. This includes using AI responses and summaries.
Credits
Our breathtaking icon was bestowed upon us by @Cevilia!
The greatest banner of all time: by @TheOneWithTheHair!
view the rest of the comments
There might be a possibility that recursion is happening and a directory is looping into itself and filling up your storage.
I have some suggestions for your command to help make a more consistent experience with rsync.
1:
--dry-run(-n) is great for troubleshooting issues. It performs a fake transfer so you can sort issues before moving any data. Remove this option when you are confident about making changes.2:
--verbose --human-readable(-vh) will give you visual feedback so you can see what is happening. Combine this with --dry-run so you get a full picture of what rsync will attempt to do before any changes are made.3:
--compress(-z) might not be suitable for this specific job, as I understand, it's meant to compress data during a file transfer intended over a network. In your commands current state, it's just adding extra processing power which might not be useful for a connected device.4: If you are transferring directories/folders, I found more consistent behaviour from rsync by adding a trailing slash at the end of a path. For example use "/home/username/folder_name/" and not "/home/username/folder_name". I've run into recursion issues by not using a trailing slash.
Don't use a trailing slash if you are transferring a single file. That distinction helps me to understand what I'm transferring too.
5:
--deletewill make sure your source folder and destination folder are a 1:1 match. Any files deleted in the source folder will be deleted in the destination folder. If you want to keep any and all added files in your destination folder, this option can be ignored.--archive(-a) and--partial --progress(-P) are both good and don't need to be changed or removed.If you do happen to be running into a recursion issue that's filling up your storage, you may need to look into using the
--excludeoption to exclude the problem folder.How do I find which folder is causing problems? When using --verbose and --dry-run, it goes way too fast and the terminal can't see all of the history
You can store the output of
rsyncin a file by usingrsync ALL_THE_OPTIONS_YOU_USED > rsync-output.txt. This creates a file called rsync-output.txt in your current directory which you can inspect later.This, however means that you won’t see the output right away. You can also use
rsync ALL_THE_OPTIONS_YOU_USED | tee rsync-output.txt, which will both create the file and display the output on your terminal while it is being produced.Having a quick scroll of the output file (neat tip with the > to get a text file, thanks!) nothing immediately jumps out to me. There isn't any repeated folders or anything like that from a glance. Anything I should look out for?
If you don't spot any recusion issues, I'd suggest looking for other issues and not spend too much time here. At least now you have some troubleshooting knowledge going forward. Best of luck figuring out the issue.
You checked 385GiB of files by hand? Is that size made up by a few humongously large files?
I suggest using
uniqto check if you have duplicate files in there. (uniq’s input must be sorted first). If you still have the output file from the previous step, and it’s calledrsync-output.txt, dosort rsync-output.txt | uniq -dc. This will print the duplicates and the number of their occurrences.when using uniq nothing is printed (I'm assuming that means no duplicates?)
I’m sorry. I was stupid. If you had duplicates due to a file system loop or symlinks, they would all be under different names. So you wouldn’t be able to find them with this method.
running du command with --count-links as suggested by another user returns 384G (so that isn't the problem it seems)
du --count-linksonly counts hard-linked files multiple types. I assumed you had a symlink loop that rsync would have tried to unwrap.For instance:
If you tried to rsync that, you’d end up with the directories
foo,bar,foo/bar,bar/foo,foo/bar/foo,bar/foo/bar,foo/bar/foo/bar, ad infinitum, in the target directory.Ok then, that makes sense
Does your terminal have a scroll back limit? You may need to change that setting if there is a limit.
That will depend on which terminal you are using and it may have a different name so I can't really help more with this specific issue. You'll have to search that up based on the terminal you are using.