Skip to content

Instantly share code, notes, and snippets.

@bolorino
Created October 1, 2021 18:39
Show Gist options
  • Save bolorino/b3761b7890b05a6114baa6f334061c15 to your computer and use it in GitHub Desktop.
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
#!/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