Skip to content

Commit

Permalink
Add mikrotik_backup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
pdostal committed Sep 9, 2024
1 parent 7565891 commit 89a5b73
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mikrotik_backup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
# Usage: ./mikrotik_backup <router-ip> <backup-dir>
ssh -i ~/.ssh/id_ed25519-mikrotik-backup $1 /export show-sensitive > $2/$1-$(date +"%Y%m%d%H%M%S").txt
find $2/ -name *.txt -type f -mtime +90 -exec rm '{}' \;

0 comments on commit 89a5b73

Please sign in to comment.