In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Today, when synchronizing data, I found that some deleted files were not deleted. Check quickly to find that IO error encountered caused the problem that files cannot be deleted. Search on the Internet and test that it can be used. In general, it is permissions or there may be a problem with the disk.
The server uses the windows version of cwRsync for synchronization. An error occurs when the delete parameter is properly synchronized.
IO error encountered-skipping file deletion
Looking for a long time but did not find a solution, checked the directory permissions, the server log did not see the disk error log information, found a temporary solution on the Internet.
Taking a closer look at the parameters of rsync, it is found that one option is:
-- ignore-errors will be deleted even if there is an Istroke O error.
(delete even if there is an Imax O error)
So add this parameter, perform synchronization again, and the problem is solved.
But as for why rsync misreported this error, I haven't found the reason yet. if anyone knows, you are welcome to answer the question.
The common parameter options of rsync are attached for your reference:
The option describes the-a,-archive archive mode, which means that the file is transferred recursively and all file attributes are maintained Equivalent to-rlptgoD (excluding-H)-r,-recursive handles subdirectories in recursive mode-l,-links keep symbolic link files-H,-hard-links keep hard-linked files-p,-perms keep file permissions-t,-times keep file time information-g,-group keep file group information-o -owner keeps file ownership information (super-user only)-D keeps device files and special files (super-user only)-z -compress compresses files when transferring files-exclude=PATTERN specifies to exclude a file matching mode that does not need to be transferred-exclude-from=FILE reads exclusion rules from FILE-include=PATTERN specifies file matching patterns to be transferred-include-from=FILE reads inclusion rules from FILE-copy-unsafe-links copy points to linked files outside the SRC path directory tree-safe-links ignores linked files outside the SRC path directory tree (default)-existing updates only those files that already exist on the receiving side Instead of backing up those newly created files-ignore-existing ignores those files that already exist on the receiving end and backs up only those newly created files-b,-backup. When there is a change, back up the old files in the target directory-backup-dir=DIR is used in conjunction with-b Save the backed-up files to the DIR directory-link-dest=DIR creates hard-linked files based on DIR when the files are not changed-delete deletes files at the receiver and those that no longer exist at the sender-delete-before receiver deletes before transfer (default)-delete-during receiver deletes during transfer-delete-after receiver deletes after transfer-delete-excluded Delete the excluded file-e at the same time as the recipient -rsh=COMMAND specifies the shell program that replaces rsh-ignore-errors deletes it even if there is an Irambo error-partial retains files that have not been fully transferred for some reason So speed up the subsequent retransfer-progress shows the transfer process on transfer-P is equivalent to-partial-progress-delay-updates saves the file being updated to a temporary directory (default is ". ~ tmp~"), and then update the target file-v,-verbose detailed output mode-Q,-quiet compact output mode-h,-human-readable output file size in readable units (e.g., K, K). M, etc.)-n,-dry-run shows which files will be transferred-list-only only lists files without copying-rsyncpath=PROGRAM specifies the path where rsync commands on the remote server are located-password-file=FILE reads passwords from FILE to avoid entering passwords on the terminal, usually use-4 when connecting to rsync servers in cron,-ipv4 uses IPv4-6,-ipv6 uses IPv6-version print version information-help displays help information
Note:
If you run the rsync command as a normal user, the owner of the synchronized file will be changed to this normal user identity.
If you run the rsync command as a superuser, the owner of the synchronized file will maintain its original user identity.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.