[[PageOutline]] = part to part PIPE = == 預期達成指令格式 == 將使用短指令方式達成 {{{ $ fsarchive savefs -p /dev/sda1 | fsarchive restfs -p /dev/sdb2 }}} [100%] savefs 參數格式 (fsarchive savefs aaa.fsa /dev/sda1) * 已完成fsarchive savefs -p /dev/sda1 格式(bool g_options.pipe) - 2011-08-24 * 已正確判讀 fsarchive savefs - /dev/sda1 格式 - 2011-08-18 * 但其他引述會有問題,故欲修改為短指令方式達成 [100%] restfs 參數格式 (fsarchiver restfs /data/myarchive2.fsa id=0,dest=/dev/sda1)[[BR]] * 已完成fsarchive restfs -p /dev/sda1 格式同savefs - 2011-08-24 [0%] save輸出的程式進入點[[BR]] * [Note] csavear: save的metadata, 其中並包含archwriter(ai), 為archive的metadate. [0%] restor輸入的程式進入點[[BR]] * [Note] oper_restfs() -> decompression_threads -> archiver_reader_threads -> read_archive_main_header -> check_min_ver. -> show_info. -> check_cmd ...and_Sth. -> read_the_fsinfo_header -> extract_filesystem_contents -> ... * [Note] (sub)extract_filesystem_contents -> extract_filesystem_extract() -> get destination_partation _> check_ver. -> check the partation mount info -> read filesystem header from archive(-> queue_dequeue_header_...) -> get index of the filesystem in the F.S. table -> make file system -> mount the new file system -> ... = Note = {{{ #!text 2011-08-25 * malloc * open/close * stdin/stdout }}} {{{ #!text 2011-08-22 fsarchive restfs /data/test.fsa id=0,dest=/dev/sdb2/ id 表示partition 的位址,因為savefs 可以同時save兩個partition,所以還原時可透過id=0的方式選擇欲還原的磁區。 不確定*.fsa的內容,可使用fsarchiver archinfo *.fsa 查看 }}} {{{ #!text 2011-08-18 argc -= optind; argv += optind; 將argc, argv指向下一個參數, 搭配loop使用, see "man optind" }}}