Solaris 10 10/09 Installation Guide: Solaris Flash Archives (Creation and Installation)

Creating a Solaris Flash Archive and Customizing Files (Examples)


Example 3–10 Creating an Archive and Excluding and Including Files and Directories

In this example, the archive is named archive2. This archive is copied from the master system but is not an exact copy. The content under the /aaa directory is excluded, but the content in /aaa/bbb/ccc remains.


# flarcreate -n archive2 -x /aaa -y /aaa/bbb/ccc  archive2.flar

To check the file structure of the archive, type the following. The excluded directories that include copied files appear, but only the files that were restored contain data.


# flar info -l aaa
aaa
aaa/bbb/ccc
aaa/bbb/ccc/ddd
aaa/bbb
ggg


Example 3–11 Creating an Archive Excluding and Including Files and Directories by Using Lists

In this example, the archive is named archive5. This archive is copied from the master system but is not an exact copy.

The exclude file contains the following list:


/aaa

The include file contains the following list:


/aaa/bbb/ccc

The content under the /aaa directory is excluded, but the content in /aaa/bbb/ccc remains.


# flarcreate -n archive5 -X exclude -f include  archive5.flar

To check about the file structure of the archive, type the following. The excluded directories that include copied files appear, but only the files that were restored contain data.


# flar info -l archive5.flar
aaa
aaa/bbb/ccc
aaa/bbb/ccc/ddd
aaa/bbb
ggg


Example 3–12 Creating an Archive Excluding Files and Directories by Using a List and Restoring a Directory

You can combine options -x, -y, -X and -f. In this example, options -X and -y are combined. The archive is named archive5. This archive is copied from the master system but is not an exact copy.

The exclude file contains the following list:


/aaa

The -y option restores the /aaa/bbb/ccc directory. The following command produces the archive.


# flarcreate -n archive5 -X exclude -y /aaa/bbb/ccc  archive5.flar

To check about the file structure of the archive, type the following. The excluded directories that include copied files appear, but only the files that were restored contain data.


# flar info -l archive5.flar
aaa
aaa/bbb
aaa/bbb/ccc
aaa/bbb/ccc/ddd
ggg


Example 3–13 Creating an Archive Excluding and Including Files and Directories by Using a List With the -z Option

In this example, the archive is named archive3. It is copied from the master system but is not an exact copy. The files and directories to be selected are included in filter1 file. Within the files, the directories are marked with a minus (-) or a plus (+) to indicate which files to exclude and restore. In this example, the directory /aaa is excluded with a minus and the subdirectory /aaa/bbb/ccc is restored with a plus. The filter1 file contains the following list.


- /aaa
+ /aaa/bbb/ccc

The following command produces the archive.


# flarcreate -n archive3 -z filter1 archive3.flar 

To check the file structure of the archive, type the following command. The excluded directories that include copied files appear, but only the files that were restored contain data.


# flar info -l archive3.flar
aaa
aaa/bbb
aaa/bbb/ccc
aaa/bbb/ccc/ddd
ggg