In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Demand:
Partners provide a FTP for us to download video materials, and these data need to be loaded into the program, the program directly loaded through the FTP is easy to hong live, need to solve this problem.
Solution:
Directly mount the local through curlftpfs, and then synchronize to other directories on the machine through rsync for program loading. Before the program is loaded, you also need to determine whether the file has been transferred or not.
The mount method is as follows:
Curlftpfs-o uid=1003,gid=1003,codepage=gbk ftp://XXX:XXXX_FTP@ftp.frce24.com / home/fileos/file/merge/france24
The following one is also fine.
Curlftpfs-o codepage=gbk ftp://XXX:XXXX_FTP@ftp.frce24.com / mnt/france24
Command comments:
Codepage: coding method, usually using utf8, you can also use gb2312
The synchronization script is as follows:
[root@let28 ~] # cat / RSYNCST RSYNCST eq bind bind Bash RSYNCST = `ps-ef | grep-v RSYNCSTS = `ps-eq | wc-l`if [$RSYNCST1]; normally, eq should be equal to 0, because there are two rsync processes in the system that kill is not lost, so you can only change the script to solve the problem. Nohup / usr/bin/rsync-avzP-- delete-- exclude=/Ar / mnt/france24/ / home/fileos/file/merge/france24/ & echo 'Rsync is down,Starting up rsync examples else echo' Rysnc is running'fi
Crontab is as follows:
[root@let28 ~] # crontab-l
/ 1 * / usr/bin/sh / home/fileos/rsync.sh
Detailed explanation of rsync parameters
-v,-- verbose detailed mode output-Q,-- quiet compact output mode-c,-- checksum turns on the check switch to force the file transfer to be checked-a,-archive archive mode, indicating that the file is transferred recursively and all file attributes are maintained. Equal to-rlptgoD-r,-- recursive processes subdirectories in recursive mode-R,-- relative uses relative path information-b,-- backup to create a backup, that is, rename the old file to ~ filename if the same file name already exists for the destination. You can use the-- suffix option to specify different backup file prefixes. -- backup-dir stores backup files (such as ~ filename) in a directory. -suffix=SUFFIX defines the backup file prefix-u,-update only to update, that is, to skip all files that already exist in DST and whose file time is later than that to be backed up. (do not overwrite updated files)-l,-- links retains soft links-- copy-links treats soft links like regular files-- copy-unsafe-links only copies links that point outside the SRC path directory tree-- safe-links ignores links outside the SRC path directory tree-H,-- hard-links retains hard links-- perms maintains file permissions-o -- owner keeps file ownership information-- g,-- group keeps file group information-- D,-- devices keeps device file information-- t,-- times keeps file time information-sparse performs special handling of sparse files to save DST space-- n,-- dry-run reality which files will be transferred-W,-- whole-file copy files. No incremental detection-x,-one-file-system do not cross file system boundaries-B,-block-size=SIZE check algorithm uses block size, default is 700byte-e,-rsh=COMMAND specifies data synchronization using rsh, ssh mode-rsync-path=PATH specifies the path information of rsync commands on the remote server-C,-cvs-exclude automatically ignores files in the same way as CVS Used to exclude files that you do not want to transfer-existing updates only those files that already exist in DST Without backing up those newly created files-- delete deletes those files that are not available in SRC in DST-- delete-excluded also deletes those files that are excluded by this option specified by this option-- delete after the delete-after transfer ends-- ignore-errors deletes even if there is an IO error-- max-delete=NUM deletes up to NUM files-- partial retains those files that have not been fully transferred for some reason. So speed up subsequent transfers-- force forcibly delete directories, even if not empty-- numeric-ids does not match numeric user and group ID to user and group names-- timeout=TIME IP timeout, in seconds-I,-- ignore-times does not skip files of the same time and length-- size-only when deciding whether to back up files Only look at the file size without considering the file time-- the timestamp window used by modify-window=NUM to determine whether the file is at the same time The default is 0murt-- temp-dir=DIR creates temporary files in DIR-- compare-dest=DIR also compares files in DIR to determine whether a backup is required-P equals-- partial--progress shows the backup process-z -- compress compresses backup files during transfer-- exclude=PATTERN specifies to exclude files that do not need to be transferred-- include=PATTERN specifies files that do not exclude but need to be transferred-- exclude-from=FILE excludes files in the specified mode in FILE-- include-from=FILE does not exclude files that match the specified pattern in FILE-- version print version information-- address binds to a specific address-- config=FILE specifies other configuration files. Do not use default rsyncd.conf files-- port=PORT specifies other rsync service ports-- blocking-io uses blocking IO-stats for remote shell to give the transfer status of certain files-- progress actual transfer process during transfer-- log-format=formAT specifies the log file format-- password-file=FILE gets the password from FILE-- bwlimit=KBPS limits the bandwidth of bwlimit=KBPS, KBytes per second-h,-- help displays help information generally using the azv option.
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.