Created
December 26, 2024 22:46
archive script
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/sh | |
# Ensure script is run as superuser | |
if [ "$(id -u)" -ne 0 ]; then | |
echo "This script must be run with sudo." >&2 | |
exit 1 | |
fi | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: $0 <destination>" | |
exit 1 | |
fi | |
rsync -auhxAX --partial-dir=".partial" --delete --no-compress --info=progress2 --exclude-from=".exclude" "." "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment