SCO UNIX下的反刪除(undelete)(轉)

BSDLite發表於2007-08-11
SCO UNIX下的反刪除(undelete)(轉)[@more@]SCO OpenServer支援Versioning Filesystems(undelete),但是預設卻沒有開啟此項功能,下面是具體細節:
1) scoadmin中選擇Hardware/Kernel Manager,選擇Filesystem configuration,
設定MAXVDEPTH為一個非零值(n=儲存多少以前版本,設定較大數時要考慮磁碟空間)
設定MINVTIME(檔案versioned之前等待的秒數)
2) 重新編譯(Relink)核心;
3) 重新啟動伺服器;
4) 啟用Undelete,針對需要設定undelete的目錄(例如:/u/data)
undelete -s /u/data
5) 為了察看Versioned情況,設定以下環境變數:
SHOWVERSIONS=1; export SHOWVERSIONS
6) 用檔案察看命令察看Versioned的檔案,可以根據需要恢復刪除或覆蓋的檔案。

undelete supports the following options:
If the -l, -p, -s, -u and -v options are not specified, undelete recovers the specified files.

-l
print a listing of all versions of the specified file(s)
-p
purge (permanently delete) specified source file(s)
-s
turn the version attribute on for the specified directories and its subsequent child directories
-u
turn the version attribute off for the specified directories
-v
force the specified file(s) to be versioned
The following additional options are recognized:
-d
normally, if the specified file is a directory, undelete will operate on the files contained in that directory. If this option is specified, undelete operates on the directory itself.

--------------------------------------------------------------------------------
NOTE: undelete does not work on directories that are mounted.
--------------------------------------------------------------------------------

-i
undelete will prompt for confirmation prior to recovering a file that will overwrite the current version of the file. A y answer means that the undeletion should proceed. Any other answer prevents undelete from undeleting the file.
-f
undelete will recover the file(s) without prompting even if it is overwriting over an existing current version of the file. This option overrides the -i option. Note that this is the default if the standard input is not a terminal.
-r
undelete will operate recursively on any directories in the argument list. Symbolic links that are encountered with this option will not be traversed.
-m [+-]days
undelete will only consider files that were deleted less than ( - ), greater than ( + ) or exactly (neither - nor + ) days ago.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10617542/viewspace-946702/,如需轉載,請註明出處,否則將追究法律責任。

相關文章