Skip to content

Instantly share code, notes, and snippets.

@jxu
Last active September 6, 2024 00:20
Show Gist options
  • Save jxu/867e7add1232bc2124397105de03cd46 to your computer and use it in GitHub Desktop.
Save jxu/867e7add1232bc2124397105de03cd46 to your computer and use it in GitHub Desktop.
Backup for Ubuntu
#!/bin/sh
# -n for dry run, --del to delete at dest
# --info and --no-i-r just for showing progress
rsync -avh --del /home/jx --info=progress2 --no-i-r --stats \
--exclude .local/share/Trash --exclude .cache \
'/media/jx/Toshiba 2TB/ubuntu_backup_latest' 2> rsync.err
@jxu
Copy link
Author

jxu commented Jan 25, 2024

Should separate stdout and stderr logs

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