Created
October 1, 2021 18:39
-
-
Save bolorino/b3761b7890b05a6114baa6f334061c15 to your computer and use it in GitHub Desktop.
Get the crontab line for the Borg Backup job on each running LXC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Get the crontab line for the Borg Backup job on each running LXC | |
# Get the vm list | |
vms="$(lxc-ls -1 --running)" | |
for v in $vms | |
do | |
echo "$v" | |
lxc-attach -n "$v" -- /bin/bash -c "crontab -l | grep borg" | |
echo "--" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment