Unix 系统备份与网络实用脚本
1. 系统备份管理
系统备份管理是系统管理员都熟悉的任务,但除非出了大问题,否则没人会为此感谢你。即便在运行 Linux 的单用户个人电脑上,制定某种备份计划也是必不可少的。很多人往往是在数据丢失后,才意识到定期备份的价值。
许多系统忽视备份的原因之一是,很多备份工具简陋且难以理解。例如 dump 和 restore 命令(在 Solaris 中为 ufsdump 和 restore ),需要设置五个“转储级别”和一个复杂的配置文件。
1.1 备份脚本代码
#!/bin/sh
# backup - Creates either a full or incremental backup of a set of
# defined directories on the system. By default, the output
# file is saved in /tmp with a timestamped filename, compressed.
# Otherwise, specify an output device (another disk, or a
# removable storage device).
usageQuit()
{
cat << "EOF" >&2
Usage: $0 [-o output] [-i|-f] [-n]
-o lets you speci
超级会员免费看
订阅专栏 解锁全文
1766

被折叠的 条评论
为什么被折叠?



