Comments (1)
my workaround if it can help others.
I use an exec hook instead of githubrepo ( or even a cron that does the push every now and then)
The drawback is that it's a 2 step process to get this configuration to work.
1 - Start the daemon, it will initialized the git repository but will likely fail to push
2 - Stop the deamon
3 - Go to the backup directory
- git remote add origin $yourGit RepoURL
- check with git remote -v
- git push --set-upstream origin master
4 - To make sure you will have a push next time
- git-crypt unlock
- edit one file sonehow, it's just to make a diff
- git-crypt lock
- git add / git commit ( do not push )
5 - start the deamon again, it should backup the devices, find a diff then push
Dec 29 09:40:41 backupvmtest oxidized[25439]: D, [2023-12-29T09:40:41.757366 #25439] DEBUG -- : Exec: Execute: "cd /home/oxidized/network-configuration-backup && /usr/bin/git push"
Dec 29 09:40:42 backupvmtest oxidized[25773]: To mygitrepo.git
Dec 29 09:40:42 backupvmtest oxidized[25773]: e062c37..c0293ec master -> master
OR this if nothing has changed
Dec 29 09:53:48 backupvmtest oxidized[25802]: D, [2023-12-29T09:53:48.399061 #25802] DEBUG -- : Exec: Execute: "cd /home/oxidized/network-configuration-backup && /usr/bin/git push"
Dec 29 09:53:48 backupvmtest oxidized[26120]: Everything up-to-date
output:
default: gitcrypt
debug: true
gitcrypt:
user: me
email: [email protected]
repo: "/home/oxidized/network-configuration-backup"
users:
- "0xABCDEF" # a user
- "0xGHIJKL" # another user
- "0xMNOPQR" # someone else
hooks:
push_to_remote:
type: exec
events: [post_store]
cmd: cd /home/oxidized/network-configuration-backup && /usr/bin/git push
from oxidized.
Related Issues (20)
- ERROR -- : Hook push_to_remote SshError: remote rejected authentication: Failed getting response
- Load nodes didn't recognized ArubaOS Mobility Controller 8.10.0.9 (use aosw or Aaosw) and F5 Big-IP (use tmos) HOT 1
- passwords with special characters (dollar sign and space) HOT 3
- ArubaOS8 need update propmt
- about not login use password (maybe is ruby net-ssh problem or oxidized??) HOT 4
- vyatta snmp community secret leakage HOT 1
- Contribution: miscellaneous models HOT 6
- Unable to backup Nexus 9000 switch - More when display running-config HOT 2
- FortiOS stopped doing a "show full-configuration" HOT 1
- Web API /next returns status 500 if node is waiting to poll
- how to secure config file ( hide / encrypt password) HOT 1
- Git error due to unproper shutdown HOT 2
- IOSXR - "Admin mode has been deprecated" HOT 4
- SSH cipher update - openssh bug CVE-2023-48795 HOT 1
- undefined method 'url' HOT 8
- Trying to create group-based repos when not configured to? HOT 2
- change default ssh port HOT 3
- environment when running docker... HOT 1
- FortiOS changes private key encryption every time config is downloaded
- Strip uptime from D-Link 3130 configs HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oxidized.