Advertisement
eXTA

Untitled

Jan 26th, 2016
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.53 KB | None | 0 0
  1. root@test:/home# bash -x /etc/procurve-bup.sh -o /mnt/Backup/Test/
  2. + set -e
  3. + set -u
  4. + readonly PROGNAME=procurve-bup
  5. + PROGNAME=procurve-bup
  6. + readonly LOG_FACILITY=user
  7. + LOG_FACILITY=user
  8. + declare quiet=
  9. + main -o /mnt/Backup/Test/
  10. + local _outdir=
  11. + local _create_archive=
  12. ++ date +%a
  13. + local _now_day=Tue
  14. + local _tfname=.switchbup-1740
  15. + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
  16. ++ command -v sshpass
  17. + [[ -z /usr/bin/sshpass ]]
  18. + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
  19. ++ command -v readlink
  20. + [[ -z /bin/readlink ]]
  21. + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
  22. ++ command -v scp
  23. + [[ -z /usr/bin/scp ]]
  24. + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
  25. ++ command -v rm
  26. + [[ -z /bin/rm ]]
  27. + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
  28. ++ command -v chmod
  29. + [[ -z /bin/chmod ]]
  30. + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
  31. ++ command -v logger
  32. + [[ -z /usr/bin/logger ]]
  33. + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
  34. ++ command -v mkdir
  35. + [[ -z /bin/mkdir ]]
  36. + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
  37. ++ command -v grep
  38. + [[ -z /bin/grep ]]
  39. + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
  40. ++ command -v ln
  41. + [[ -z /bin/ln ]]
  42. + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
  43. ++ command -v mv
  44. + [[ -z /bin/mv ]]
  45. + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
  46. ++ command -v diff
  47. + [[ -z /usr/bin/diff ]]
  48. + for cmd in sshpass readlink scp rm chmod logger mkdir grep ln mv diff tar
  49. ++ command -v tar
  50. + [[ -z /bin/tar ]]
  51. ++ guess_config_fname
  52. ++ [[ -e ./procurve-bup.conf ]]
  53. ++ [[ -e /root/.procurve-bup.conf ]]
  54. ++ [[ -e /etc/procurve-bup.conf ]]
  55. ++ echo /etc/procurve-bup.conf
  56. ++ return 0
  57. + local _config_fname=/etc/procurve-bup.conf
  58. + getopts :haqc:o: opt
  59. + case $opt in
  60. + _outdir=/mnt/Backup/Test/
  61. + getopts :haqc:o: opt
  62. + [[ -z /mnt/Backup/Test/ ]]
  63. + [[ -z /etc/procurve-bup.conf ]]
  64. + [[ ! -f /etc/procurve-bup.conf ]]
  65. + [[ ! -r /etc/procurve-bup.conf ]]
  66. ++ readlink -f /etc/procurve-bup.conf
  67. + _config_fname=/etc/procurve-bup.conf
  68. + [[ ! -d /mnt/Backup/Test/ ]]
  69. + cd /mnt/Backup/Test/
  70. + grep '^main' /etc/procurve-bup.conf
  71. + read name addr user method value
  72. + [[ -z main-switch ]]
  73. + [[ -z 192.168.0.88 ]]
  74. + [[ -z root ]]
  75. + [[ -z password ]]
  76. + case "$method" in
  77. + pw=password
  78. + pubkey=
  79. + [[ -z password ]]
  80. + log_notice 'Backing up main-switch (192.168.0.88)'
  81. + log2syslog notice '' 'Backing up main-switch (192.168.0.88)'
  82. + local _priority=notice
  83. + local _quiet=
  84. + local '_msg=Backing up main-switch (192.168.0.88)'
  85. + local _logger_args=
  86. + [[ -n '' ]]
  87. + _logger_args=-sit
  88. + logger -sit procurve-bup -p user.notice -- Backing up main-switch '(192.168.0.88)'
  89. procurve-bup[1758]: Backing up main-switch (192.168.0.88)
  90. + [[ ! -d main-switch ]]
  91. + pushd main-switch
  92. + failed=0
  93. + for cfg in startup-config running-config
  94. + case "$method" in
  95. + log_notice 'Fetching '\''startup-config'\'' via SSH using password auth'
  96. + log2syslog notice '' 'Fetching '\''startup-config'\'' via SSH using password auth'
  97. + local _priority=notice
  98. + local _quiet=
  99. + local '_msg=Fetching '\''startup-config'\'' via SSH using password auth'
  100. + local _logger_args=
  101. + [[ -n '' ]]
  102. + _logger_args=-sit
  103. + logger -sit procurve-bup -p user.notice -- Fetching ''\''startup-config'\''' via SSH using password auth
  104. procurve-bup[1760]: Fetching 'startup-config' via SSH using password auth
  105. + scp_using_password [email protected] password /cfg/startup-config .switchbup-1740
  106. + local password=password
  107. + local remote_file=/cfg/startup-config
  108. + local local_file=.switchbup-1740
  109. + local '_ssh_opts=-q -o PubkeyAuthentication=no -o PasswordAuthentication=yes'
  110. ++ mktemp
  111. + local _tfile=/tmp/tmp.YKKt92hix8
  112. + chmod 600 /tmp/tmp.YKKt92hix8
  113. + echo password
  114. + failed=0
  115. + sshpass -f /tmp/tmp.YKKt92hix8 scp -q -o PubkeyAuthentication=no -o PasswordAuthentication=yes [email protected] 8:/cfg/startup-config .switchbup-1740
  116. + failed=1
  117. + rm -f /tmp/tmp.YKKt92hix8
  118. + return 1
  119. + continue
  120. + for cfg in startup-config running-config
  121. + case "$method" in
  122. + log_notice 'Fetching '\''running-config'\'' via SSH using password auth'
  123. + log2syslog notice '' 'Fetching '\''running-config'\'' via SSH using password auth'
  124. + local _priority=notice
  125. + local _quiet=
  126. + local '_msg=Fetching '\''running-config'\'' via SSH using password auth'
  127. + local _logger_args=
  128. + [[ -n '' ]]
  129. + _logger_args=-sit
  130. + logger -sit procurve-bup -p user.notice -- Fetching ''\''running-config'\''' via SSH using password auth
  131. procurve-bup[1767]: Fetching 'running-config' via SSH using password auth
  132. + scp_using_password [email protected] password /cfg/running-config .switchbup-1740
  133. + local password=password
  134. + local remote_file=/cfg/running-config
  135. + local local_file=.switchbup-1740
  136. + local '_ssh_opts=-q -o PubkeyAuthentication=no -o PasswordAuthentication=yes'
  137. ++ mktemp
  138. + local _tfile=/tmp/tmp.T2Y0weqarr
  139. + chmod 600 /tmp/tmp.T2Y0weqarr
  140. + echo password
  141. + failed=0
  142. + sshpass -f /tmp/tmp.T2Y0weqarr scp -q -o PubkeyAuthentication=no -o PasswordAuthentication=yes [email protected] 8:/cfg/running-config .switchbup-1740
  143. + failed=1
  144. + rm -f /tmp/tmp.T2Y0weqarr
  145. + return 1
  146. + continue
  147. + [[ 1 -eq 0 ]]
  148. + popd
  149. + read name addr user method value
  150. + [[ -n '' ]]
  151. + exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement