Skip to content

Instantly share code, notes, and snippets.

@azat
Last active November 13, 2019 23:08
Show Gist options
  • Select an option

  • Save azat/16cd9b2450ebdab7dc55f38b4ca97026 to your computer and use it in GitHub Desktop.

Select an option

Save azat/16cd9b2450ebdab7dc55f38b4ca97026 to your computer and use it in GitHub Desktop.
# overall
borg create --list --exclude-from excludes --one-file-system --dry-run srv:/location::name / |& grep ^- | cut -d' ' -f2- | python -c 'import os, sys; [ print(p.strip()) if not os.path.isdir(p.strip()) else None for p in sys.stdin ]' | tr '\n' '\0' | du -sch --files0-from=- | tail -1
# top
borg create --list --exclude-from excludes --one-file-system --dry-run srv:/location::name / |& grep ^- | cut -d' ' -f2- | python -c 'import os, sys; [ print(p.strip()) if not os.path.isdir(p.strip()) else None for p in sys.stdin ]' | tr '\n' '\0' | du -ch --files0-from=- | sort --human-numeric-sort | tail -n500
@azat
Copy link
Author

azat commented Nov 13, 2019

tar --preserve-permissions --one-file-system --exclude-from ~borg.excludes / /boot --zstd -cf /mnt/tar.zst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment