aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2025-07-25 07:53:27 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2025-07-28 22:17:11 +0200
commit5d96fa9755d690828fca6b041f799f44241299d5 (patch)
treef7dd2853857665239a09dbbc1fabb856c08bf6ab
parent27f4d5f3c01db958c1f5685f509033272f7fcea8 (diff)
downloadinfra-5d96fa9755d690828fca6b041f799f44241299d5.tar.gz
infra-5d96fa9755d690828fca6b041f799f44241299d5.tar.bz2
infra-5d96fa9755d690828fca6b041f799f44241299d5.tar.xz
infra-5d96fa9755d690828fca6b041f799f44241299d5.zip
Backup tool for lhn2ix
-rwxr-xr-xconfig/backup-lhn2ix13
1 files changed, 13 insertions, 0 deletions
diff --git a/config/backup-lhn2ix b/config/backup-lhn2ix
new file mode 100755
index 0000000..0b135fb
--- /dev/null
+++ b/config/backup-lhn2ix
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+set -euo pipefail
+
+basedir="${0%/*}"
+
+cd "$basedir"
+
+ssh ubnt@192.168.11.1 \
+ /opt/vyatta/bin/vyatta-op-cmd-wrapper show configuration commands \
+ > .tmp
+
+mv .tmp "${0##*backup-}".txt