Bienvenidos

Todos estos pasos descriptos fueron probados en ambientes productivos

miércoles, 14 de julio de 2010

Usando fsnap para backupear zonas


Normalmente uso ufsdump ,pero esta es otra opcion valida.
Aca va un ejemplo.

[asun0001] /space # fssnap -F ufs -o bs=/space /

/dev/fssnap/0
[asun0001] /space # ls -lh /space
total 3442
drwxrwxrwx 2 root root 8.0K Jul 3 12:02 lost+found
-rw------- 1 root root 11G Oct 10 11:47 snapshot0
[asun0001] /space #
[asun0001] /space # fssnap -i
0 /
[asun0001] /space # /usr/lib/fs/ufs/fssnap -i /
Snapshot number : 0
Block Device : /dev/fssnap/0
Raw Device : /dev/rfssnap/0
Mount point : /
Device state : idle
Backing store path : /space/snapshot0
Backing store size : 1472 KB
Maximum backing store size : Unlimited
Snapshot create time : Tue Oct 10 11:45:11 2006
Copy-on-write granularity : 32 KB

[asun0001] / # mount -F ufs -o ro /dev/fssnap/0 /space/KKK
[asun0001] / # df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t0d0s0 11G 7.3G 3.1G 71% /
/dev/dsk/c0t0d0s5 5.8G 1.2G 4.5G 22% /var
swap 3.3G 40K 3.3G 1% /tmp
swap 3.3G 72K 3.3G 1% /var/run
/dev/dsk/c0t1d0s0 9.8G 4.4G 5.3G 46% /export/big-zone
/dev/dsk/c0t0d0s7 49G 52M 49G 1% /space
/dev/fssnap/0 11G 7.3G 3.1G 71% /space/KKK
[asun0001] / #

[asun0001] / # zonecfg -z small-zone export >/space/small-zone.config
[asun0001] / # zonecfg -z big-zone export >/space/big-zone.config
asun0001] / # zoneadm list -cv
ID NAME STATUS PATH
0 global running /
4 big-zone running /export/big-zone
- small-zone configured /export/small-zone
[asun0001] / #
[asun0001] / # zlogin -S small-zone init 0
[asun0001] / # zoneadm list -cv
ID NAME STATUS PATH
0 global running /
4 big-zone running /export/big-zone
- small-zone installed /export/small-zone
[asun0001] / #
[asun0001] /export # zoneadm -z small-zone uninstall -F
[asun0001] /export # zonecfg -z small-zone delete -F
[asun0001] /export #
[asun0001] / # zoneadm list -cv
ID NAME STATUS PATH
0 global running /
4 big-zone running /export/big-zone
[asun0001] / #
[asun0001] / # zonecfg -z small-zone -f /space/small-zone.config
[asun0001] / # zoneadm list -cv
ID NAME STATUS PATH
0 global running /
4 big-zone running /export/big-zone
- small-zone configured /export/small-zone
[asun0001] / # zoneadm -z small-zone verify
[asun0001] / # zoneadm list -cv
ID NAME STATUS PATH
0 global running /
4 big-zone running /export/big-zone
- small-zone configured /export/small-zone
[asun0001] / #

[asun0001] / # zoneadm -z small-zone install
Preparing to install zone .
Creating list of files to copy from the global zone.
Copying 3186 files to the zone.
Initializing zone product registry.
Determining zone package initialization order.
Preparing to initialize 1605 packages on the zone.
Initialized 1605 packages on zone.
Zone is initialized.
Installation of 2 packages was skipped.
Installation of these packages generated warnings:
The file contains a log of the zone installation.
[asun0001] / #

No hay comentarios:

Publicar un comentario