关于Linux的rear命令

295 篇文章 0 订阅
117 篇文章 0 订阅
man了一下rear,是这么解释的:

NAME
       rear - bare metal disaster recovery and system migration tool


SYNOPSIS
       rear [-h|--help] [-V|--version] [-dsSv] [-D|--debugscripts SET] [-c DIR] [-C CONFIG] [-r KERNEL] [--] COMMAND [ARGS...]


DESCRIPTION
       Relax-and-Recover is the leading Open Source disaster recovery solution. It is a modular framework with many ready-to-go workflows for common situations.


       Relax-and-Recover produces a bootable image. This image can repartition the system. Once that is done it initiates a restore from backup. Restores to different hardware are
       possible. Relax-and-Recover can therefore be used as a migration tool as well.


       Currently Relax-and-Recover supports various boot media (incl. ISO, PXE, OBDR tape, USB or eSATA storage), a variety of network protocols (incl. sftp, ftp, http, nfs, cifs) for
       storage and backup as well as a multitude of backup strategies (incl. IBM Tivoli Storage Manager, HP DataProtector, Symantec NetBackup, EMC NetWorker, FDR/Upstream, NovaBACKUP
       DC, Bareos, Bacula, rsync, rbme, Borg). This results in a bootable image that is capable of booting via PXE, DVD/CD, bootable tape or virtual provisioning.


       Relax-and-Recover was designed to be easy to set up, requires no maintenance and is there to assist when disaster strikes. Its setup-and-forget nature removes any excuses for not
       having a disaster recovery solution implemented.


       Recovering from disaster is made very straight-forward by a 2-step recovery process so that it can be executed by operational teams when required. When used interactively (e.g.
       when used for migrating systems), menus help make decisions to restore to a new (hardware) environment.


       Extending Relax-and-Recover is made possible by its modular framework. Consistent logging and optionally extended output help understand the concepts behind Relax-and-Recover and
       help debug during development.


       Relax-and-Recover comes with ABSOLUTELY NO WARRANTY; for details see the GNU General Public License at: http://www.gnu.org/licenses/gpl.html

读下来,貌似rear是linux下的操作系统备份工具,还可以制作当前操作系统的备份盘等.

更详细的用法见:
http://relax-and-recover.org/documentation/getting-started

如下全文转载上面的链接:

Getting Started

This quick start guide will show you how to run Relax-and-Recover from the git checkout and create a bootable USB backup.

Start by cloning the Relax-and-Recover sources from GitHub:

git clone https://github.com/rear/rear.git
Move into the rear/ directory:

cd rear/
Prepare your USB media. Change /dev/sdb to the correct device in your situation. Relax-and-Recover will ‘own’ the device in this example.

This will destroy all data on that device.

sudo usr/sbin/rear format /dev/sdb
Relax-and-recover asks you to confirm that you want to format the device:

Yes
The device has been labeled REAR-000 by the ‘format’ workflow.

Now edit the ‘etc/rear/local.conf’ configuration file:

cat > etc/rear/local.conf <<EOF
### write the rescue initramfs to USB and update the USB bootloader
OUTPUT=USB

### create a backup using the internal NETFS method, using 'tar'
BACKUP=NETFS

### write both rescue image and backup to the device labeled REAR-000
BACKUP_URL=usb:///dev/disk/by-label/REAR-000
EOF
Now you are ready to create a rescue image. We want verbose output.

sudo usr/sbin/rear -v mkrescue
The output I get is:

Relax-and-Recover 1.13.0 / $Date$
Using log file: /home/jeroen/tmp/quickstart/rear/var/log/rear/rear-fireflash.log
Creating disk layout
Creating root filesystem layout
WARNING: To login as root via ssh you need to setup an authorized_keys file in /root/.ssh
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Creating initramfs
Writing MBR to /dev/sdb
Copying resulting files to usb location
You might want to check the log file for possible errors or see what Relax-and-Recover is doing.

Now reboot your system and try to boot from the USB device.


If that worked, you can dive into the advanced Relax-and-Recover options and start creating full backups. If your USB device has enough space, initiate a backup using:


sudo usr/sbin/rear -v mkbackup
That is it. Your hard disk can now safely fail.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值