Config-Nested

 view release on metacpan or  search on metacpan

t/waltz.t.conf  view on Meta::CPAN

#######################################################################
@section repository backup
@boolean worry ignore verbose noop purge
@variable expunge retain maxdel keep linknumber rsync title PATH RSYNC_RSH
@array purge tell errors options directory okcode

#######################################################################

# Configuration file for backup.

# Environment
PATH=/usr/bin:/bin
RSYNC_RSH="ssh -F /dev/null -q -x "

tell	fred@domain.com

# Specify the host and directory details.
repository server:/var/backup
{
	RSYNC_RSH .= "-p 222 -i .ssh/id_dsa"

	linknum	4
	expunge	1w
	retain	4

	err	fred@domain.com

	{
		RSYNC_RSH .= " -x"
		options	--bwlimit=1000
		dir	/etc /root

		backup	workstation { }
	}

	backup	workstation2
	{
		options	--bwlimit=100
		options	--exclude=goodlist.db
		options --exclude=Cache

		dir	/home
		dir	/usr/local
		dir	/var/mysql
	}

	{
		backup waltz@pc
		{
			!worry
			dir	":backup"
			dir	":C/epson"
			options --password-file=.ssh/.pwd
			okcode	23 # some files could not be transferred
		}
	}
}

t/waltz.t.out  view on Meta::CPAN

$VAR1 = {
          'backup' => [
                        bless( {
                                 '+' => [
                                          [
                                            'repository',
                                            'server:/var/backup'
                                          ],
                                          [
                                            'backup',
                                            'workstation'
                                          ]
                                        ],
                                 'PATH' => '/usr/bin:/bin',
                                 'RSYNC_RSH' => 'ssh -F /dev/null -q -x -p 222 -i .ssh/id_dsa -x',
                                 'backup' => 'workstation',
                                 'directory' => [
                                                  '/etc',
                                                  '/root'
                                                ],
                                 'errors' => [
                                               'fred@domain.com'
                                             ],
                                 'expunge' => '1w',
                                 'ignore' => 0,
                                 'keep' => '',
                                 'linknumber' => '4',
                                 'maxdel' => '',
                                 'noop' => 0,
                                 'okcode' => [],
                                 'options' => [
                                                '--bwlimit=1000'
                                              ],
                                 'purge' => 0,
                                 'repository' => 'server:/var/backup',
                                 'retain' => '4',
                                 'rsync' => '',
                                 'tell' => [
                                             'fred@domain.com'
                                           ],
                                 'title' => '',
                                 'verbose' => 0,
                                 'worry' => 0
                               }, 'Config::Nested::Section' ),
                        bless( {
                                 '+' => [
                                          [
                                            'repository',
                                            'server:/var/backup'
                                          ],
                                          [
                                            'backup',
                                            'workstation2'
                                          ]
                                        ],
                                 'PATH' => '/usr/bin:/bin',
                                 'RSYNC_RSH' => 'ssh -F /dev/null -q -x -p 222 -i .ssh/id_dsa',
                                 'backup' => 'workstation2',
                                 'directory' => [
                                                  '/home',
                                                  '/usr/local',
                                                  '/var/mysql'
                                                ],
                                 'errors' => [
                                               'fred@domain.com'
                                             ],
                                 'expunge' => '1w',
                                 'ignore' => 0,

t/waltz.t.out  view on Meta::CPAN

                                 'linknumber' => '4',
                                 'maxdel' => '',
                                 'noop' => 0,
                                 'okcode' => [],
                                 'options' => [
                                                '--bwlimit=100',
                                                '--exclude=goodlist.db',
                                                '--exclude=Cache'
                                              ],
                                 'purge' => 0,
                                 'repository' => 'server:/var/backup',
                                 'retain' => '4',
                                 'rsync' => '',
                                 'tell' => [
                                             'fred@domain.com'
                                           ],
                                 'title' => '',
                                 'verbose' => 0,
                                 'worry' => 0
                               }, 'Config::Nested::Section' ),
                        bless( {
                                 '+' => [
                                          [
                                            'repository',
                                            'server:/var/backup'
                                          ],
                                          [
                                            'backup',
                                            'waltz@pc'
                                          ]
                                        ],
                                 'PATH' => '/usr/bin:/bin',
                                 'RSYNC_RSH' => 'ssh -F /dev/null -q -x -p 222 -i .ssh/id_dsa',
                                 'backup' => 'waltz@pc',
                                 'directory' => [
                                                  ':backup',
                                                  ':C/epson'
                                                ],
                                 'errors' => [
                                               'fred@domain.com'
                                             ],
                                 'expunge' => '1w',
                                 'ignore' => 0,
                                 'keep' => '',
                                 'linknumber' => '4',
                                 'maxdel' => '',
                                 'noop' => 0,
                                 'okcode' => [
                                               '23'
                                             ],
                                 'options' => [
                                                '--password-file=.ssh/.pwd'
                                              ],
                                 'purge' => 0,
                                 'repository' => 'server:/var/backup',
                                 'retain' => '4',
                                 'rsync' => '',
                                 'tell' => [
                                             'fred@domain.com'
                                           ],
                                 'title' => '',
                                 'verbose' => 0,
                                 'worry' => 0
                               }, 'Config::Nested::Section' )
                      ],
          'repository' => [
                            bless( {
                                     '+' => [
                                              [
                                                'repository',
                                                'server:/var/backup'
                                              ]
                                            ],
                                     'PATH' => '/usr/bin:/bin',
                                     'RSYNC_RSH' => 'ssh -F /dev/null -q -x -p 222 -i .ssh/id_dsa',
                                     'backup' => '',
                                     'directory' => [],
                                     'errors' => [
                                                   'fred@domain.com'
                                                 ],
                                     'expunge' => '1w',
                                     'ignore' => 0,
                                     'keep' => '',
                                     'linknumber' => '4',
                                     'maxdel' => '',
                                     'noop' => 0,
                                     'okcode' => [],
                                     'options' => [],
                                     'purge' => 0,
                                     'repository' => 'server:/var/backup',
                                     'retain' => '4',
                                     'rsync' => '',
                                     'tell' => [
                                                 'fred@domain.com'
                                               ],
                                     'title' => '',
                                     'verbose' => 0,
                                     'worry' => 0
                                   }, 'Config::Nested::Section' )
                          ]



( run in 1.300 second using v1.01-cache-2.11-cpan-49f99fa48dc )