/tmp
To be emptied between reboots and consequently to be emptied in a restore situation. See here for more details:
​http://www.pathname.com/fhs/pub/fhs-2.3.html#VARCACHEAPPLICATIONCACHEDATA. In particular: "Although data stored in /tmp may be deleted in
a site-specific manner, it is recommended that files and directories located in /tmp be deleted whenever the system is booted."

Installation Directories

Distribution packages are installed under /usr, builts from the tarballs with install under /usr/local. The following only deals with /usr.

File Locations

binaries: /usr/sbin

configuration: /etc/[mindi|mondo] (only mindi uses it ATM)

documentation: /usr/share/doc/[mindi|mondo(|mondo-doc)]

manpages: /usr/share/man/man8

package-specific other files:

binary files: /usr/lib/[mindi|mondo]

non-binary (platform-independent) files: /usr/share/[mindi|mondo]

shared libraries: /usr/lib (shared libraries turned-off in 2.0.8)

boot images: /var/cache/[mindi|mondo]

boot images created by mindi: /var/cache/mindi

ISO images created by mondo: /var/cache/mondo

temporary files: /tmp/[mondo|mindi].*

mondo scratch directory: /var/spool/mondo

Discussion

'-d' switch should really only allow manipulation of location for data images as it is the case now, i.e. '-d' should allow for changing /var/cache/mondo to a different location. Boot images should always go to /var/cache/mindi. The reasoning behind it is consistency on the one hand but allowing moving the potentially large contents of the /var/cache/mondo someplace else on the other.

During restoration, mondorestore should use also /var/cache/mondo

GNU Coding Standards

The GNU project has defined a good set of coding standards over the years. The latest version can be found here: ​http://www.gnu.org/prep/standards/standards.html. In fact, these standards are not really specific to GNU but can be viewed as best practice for at least pretty much any C program - many of the points made applies regardless of the programming language. Mondo Rescue strives to adhere to the GNU Coding Standards unlesss there is a reason not to.

getopt(3) and getopt_long(3) are the two standard function provided by the GNU C library for this purpose. See their manpages for details.

Processing Command Lines Parameters

Currently, we only support short command line switches, i.e. '-<single character>'. This does allow for compact invocation of our programs but is not very expressive. However, the GNU Coding Standards recommend the use of long options of the format '--<expressive expression>' besides the short ones for better trnsparency of the exact nature and working of the command invoked.

mondoarchive Command Line Options

Preliminary table of long command line options verus short ones.

Short

Long

Done

-O

--backup

-V

--verify

-c

--media-cd

-w

(to be deleted)

-r

(to be deleted)

-C

--media-cd-stream

-p

--prefix

-i

--media-iso

-n

--media-nfs

-t

--media-tape

-u

--media-stream-generic

-D

--differential

-E

--exclude

-I

--include

-J

-include-list

-N

--exclude-netmounts

-d

--backup-path

-g

(to be deleted)

-k

--kernel-path

-m

--cd-drive-safe-mode

-o

--use-lilo

-s

--media-size

-x

--partitions-to-archive

-A

--run-after each-media

-B

--run-before-each-media

-F

--dont-ask-for-floppies

-H

--non-interactive-restore

-L

--use-lzop

-R

--use-star

-P

--run-post-nuke

-S

--scratch-dir

-T

--temp-dir

-W

--not-bootable

-b

--tape-blocksize

-e

--dont-eject

-f

--mbr-device

-Q

--bootloader-info

-K

--loglevel

-h

--help or --usage

-v

--version

Notes: --help and --version recommended by GNU Coding Standards,

mondorestore Command Line Options

Preliminary table of long command line options verus short ones.

Short

Long

Done

-h

--help or --usage

-v

--version

mindi Command Line Options

Preliminary table of long command line options verus short ones.

Short

Long

Done

-f

--find-kernel

-m

--make-mount-list

-s

--max-compressed-size

-c

--custom

-h

--help or --usage

-v

--version

Formatting of C Code

The following outlines the coding standard for Mondo Rescue. Note that while mondo is implemented in C, mindi is currently a bash script.