15、Unix 系统备份与网络实用脚本

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值