Rsync
Appearance
See Archwiki:rsync and rsync(1) - Linux man page
System Backups
- Create a script and add it to your
crontab -e
Basic Backup
#!/bin/bash
TARGET_FOLDER=<your target for backup>
EXCLUSIONS='--exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"}'
sudo rsync -aAXq ${EXCLUSIONS} / "${TARGET_FOLDER}"
- Flags
-aarchive mode-Apreserve ACLs (access control lists)-Xpreserve extended attributes-qquiet
Exclude
Add --exclude to your call.
- Notes
- Exclude typically uses a pattern. If you want to exclude from the root of the transfer, prepend
/.- E.g
rclone --exclude "/project/node_modules" project /some/other/dir/
- E.g
- Add
--excludebefore--statsand--deleteif you want it to work.
You can also use --exclude-from and point to a text file list of exclusions.