Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@ubuntu:/home/test# bash -x /etc/procurve-bup.sh -o /mnt/Backup/Test/
- + set -e
- + set -u
- + readonly PROGNAME=procurve-bup
- + PROGNAME=procurve-bup
- + readonly LOG_FACILITY=user
- + LOG_FACILITY=user
- + declare quiet=
- + main -o /mnt/Backup/Test/
- + local _outdir=
- + local _create_archive=
- ++ date +%a
- + local _now_day=Tue
- + local _tfname=.switchbup-10395
- + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
- ++ command -v sshpass
- + [[ -z /usr/bin/sshpass ]]
- + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
- ++ command -v readlink
- + [[ -z /bin/readlink ]]
- + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
- ++ command -v scp
- + [[ -z /usr/bin/scp ]]
- + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
- ++ command -v rm
- + [[ -z /bin/rm ]]
- + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
- ++ command -v chmod
- + [[ -z /bin/chmod ]]
- + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
- ++ command -v logger
- + [[ -z /usr/bin/logger ]]
- + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
- ++ command -v mkdir
- + [[ -z /bin/mkdir ]]
- + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
- ++ command -v grep
- + [[ -z /bin/grep ]]
- + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
- ++ command -v ln
- + [[ -z /bin/ln ]]
- + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
- ++ command -v mv
- + [[ -z /bin/mv ]]
- + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
- ++ command -v diff
- + [[ -z /usr/bin/diff ]]
- + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
- ++ command -v tar
- + [[ -z /bin/tar ]]
- ++ guess_config_fname
- ++ [[ -e ./procurve-bup.conf ]]
- ++ [[ -e /root/.procurve-bup.conf ]]
- ++ [[ -e /etc/procurve-bup.conf ]]
- ++ echo /etc/procurve-bup.conf
- ++ return 0
- + local _config_fname=/etc/procurve-bup.conf
- + getopts :haqc:o: opt
- + case $opt in
- + _outdir=/mnt/Backup/Test/
- + getopts :haqc:o: opt
- + [[ -z /mnt/Backup/Test/ ]]
- + [[ -z /etc/procurve-bup.conf ]]
- + [[ ! -f /etc/procurve-bup.conf ]]
- + [[ ! -r /etc/procurve-bup.conf ]]
- ++ readlink -f /etc/procurve-bup.conf
- + _config_fname=/etc/procurve-bup.conf
- + [[ ! -d /mnt/Backup/Test/ ]]
- + cd /mnt/Backup/Test/
- + read name addr user method value
- + grep -P '^\s*[^#;]' /etc/procurve-bup.conf
- + [[ -z main-switch ]]
- + [[ -z 192.168.0.88 ]]
- + [[ -z root ]]
- + [[ -z password ]]
- + case "$method" in
- + pw=password
- + pubkey=
- + [[ -z password ]]
- + log_notice 'Backing up main-switch (192.168.0.88)'
- + log2syslog notice '' 'Backing up main-switch (192.168.0.88)'
- + local _priority=notice
- + local _quiet=
- + local '_msg=Backing up main-switch (192.168.0.88)'
- + local _logger_args=
- + [[ -n '' ]]
- + _logger_args=-sit
- + logger -sit procurve-bup -p user.notice -- Backing up main-switch '(192.168.0.88)'
- procurve-bup[10413]: Backing up main-switch (192.168.0.88)
- + [[ ! -d main-switch ]]
- + pushd main-switch
- + failed=0
- + for cfg in startup-config running-config
- + case "$method" in
- + log_notice 'Fetching '\''startup-config'\'' via SSH using password auth'
- + log2syslog notice '' 'Fetching '\''startup-config'\'' via SSH using password auth'
- + local _priority=notice
- + local _quiet=
- + local '_msg=Fetching '\''startup-config'\'' via SSH using password auth'
- + local _logger_args=
- + [[ -n '' ]]
- + _logger_args=-sit
- + logger -sit procurve-bup -p user.notice -- Fetching ''\''startup-config'\''' via SSH using password auth
- procurve-bup[10414]: Fetching 'startup-config' via SSH using password auth
- + scp_using_password [email protected] password /cfg/startup-config .switchbup-10395
- + local [email protected]
- + local password=password
- + local remote_file=/cfg/startup-config
- + local local_file=.switchbup-10395
- + local '_ssh_opts=-q -o PubkeyAuthentication=no -o PasswordAuthentication=yes'
- ++ mktemp
- + local _tfile=/tmp/tmp.fBvFDRPUJ6
- + chmod 600 /tmp/tmp.fBvFDRPUJ6
- + echo password
- + failed=0
- + sshpass -f /tmp/tmp.fBvFDRPUJ6 scp -q -o PubkeyAuthentication=no -o PasswordAuthentication=yes [email protected]:/cfg/startup-config .switchbup-10395
- + rm -f /tmp/tmp.fBvFDRPUJ6
- + return 0
- + [[ -f .switchbup-10395 ]]
- + chmod 440 .switchbup-10395
- + ln -f .switchbup-10395 startup-config
- + mv -f .switchbup-10395 main-switch_Tue_startup-config
- + sleep 5
- + for cfg in startup-config running-config
- + case "$method" in
- + log_notice 'Fetching '\''running-config'\'' via SSH using password auth'
- + log2syslog notice '' 'Fetching '\''running-config'\'' via SSH using password auth'
- + local _priority=notice
- + local _quiet=
- + local '_msg=Fetching '\''running-config'\'' via SSH using password auth'
- + local _logger_args=
- + [[ -n '' ]]
- + _logger_args=-sit
- + logger -sit procurve-bup -p user.notice -- Fetching ''\''running-config'\''' via SSH using password auth
- procurve-bup[10425]: Fetching 'running-config' via SSH using password auth
- + scp_using_password [email protected] password /cfg/running-config .switchbup-10395
- + local [email protected]
- + local password=password
- + local remote_file=/cfg/running-config
- + local local_file=.switchbup-10395
- + local '_ssh_opts=-q -o PubkeyAuthentication=no -o PasswordAuthentication=yes'
- ++ mktemp
- + local _tfile=/tmp/tmp.CtBYc6jT4B
- + chmod 600 /tmp/tmp.CtBYc6jT4B
- + echo password
- + failed=0
- + sshpass -f /tmp/tmp.CtBYc6jT4B scp -q -o PubkeyAuthentication=no -o PasswordAuthentication=yes [email protected]:/cfg/running-config .switchbup-10395
- + rm -f /tmp/tmp.CtBYc6jT4B
- + return 0
- + [[ -f .switchbup-10395 ]]
- + chmod 440 .switchbup-10395
- + ln -f .switchbup-10395 running-config
- + mv -f .switchbup-10395 main-switch_Tue_running-config
- + sleep 5
- + [[ 0 -eq 0 ]]
- + diff -q startup-config running-config
- + popd
- + read name addr user method value
- + [[ -n '' ]]
- + exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement