美文网首页
timeshift 系统快照备份

timeshift 系统快照备份

作者: 春秋不做梦 | 来源:发表于2021-04-21 17:48 被阅读0次

timeshift 支持ubuntu ,debian系统

安装timeshift

sudo apt-add-repository -y ppa:teejee2008/ppasudo

apt-get updatesudo

apt-get install timeshift

安装报错ValueError: SSL support not available

处理方法:安装ssl

sudo apt-get install openssl

sudo apt-get install libssl-dev

命令行详解:

Syntax:timeshift --check 

timeshift --create [OPTIONS] 

timeshift --restore [OPTIONS] 

timeshift --delete-[all] [OPTIONS] 

timeshift --list-{snapshots|devices} [OPTIONS]

Options:

List:

--list[-snapshots]        List snapshots 

--list-devices            List devices

Backup:

--check                    Create snapshot if scheduled 

--create                  Create snapshot (even if not scheduled) 

--comments <string>        Set snapshot description 

--tags {O,B,H,D,W,M}      Add tags to snapshot (default: O)

Restore:

--restore                  Restore snapshot 

--clone                    Clone current system 

--snapshot <name>          Specify snapshot to restore 

--target[-device] <device> Specify target device 

--grub[-device] <device>  Specify device for installing GRUB2 bootloader 

--skip-grub                Skip GRUB2 reinstall

Delete:

--delete                  Delete snapshot 

--delete-all              Delete all snapshots

创建实列:

root@ubuntu:~# timeshift --create

Select backup device:

Num    Device        Size  Type  Label

------------------------------------------------------------------------------

0    >  /dev/sda1  20.0 GB  ext4

1    >  /dev/sdb1  21.0 GB  ext4                                                       #提前准备好一个ext4的盘,作为备份盘

Enter device name or number (a=Abort): 1

------------------------------------------------------------------------------

Estimating system size...

Creating new snapshot...(RSYNC)

Saving to device: /dev/sdb1, mounted at path: /mnt/nfs

Synching files with rsync...

Created control file: /mnt/nfs/timeshift/snapshots/2021-04-21_02-21-42/info.json

RSYNC Snapshot saved successfully (231s)

Tagged snapshot '2021-04-21_02-21-42': ondemand

------------------------------------------------------------------------------

root@ubuntu:~#ls  timeshift/snapshots/2021-04-21_02-21-42/localhost/

bin  dev  home        lib    media  opt  root  sbin  sys        tmp  var

boot  etc  initrd.img  lib64  mnt    proc  run  srv  timeshift  usr  vmlinuz

恢复实例:

#timeshift --list

#timeshift --restore --snapshot ‘2021-04-21 02-21-42’

相关文章

网友评论

      本文标题:timeshift 系统快照备份

      本文链接:https://www.haomeiwen.com/subject/wxpzlltx.html