Rsync: Difference between revisions

From David's Wiki
(Created page with "See Archwiki:rsync and[https://linux.die.net/man/1/rsync rsync(1) - Linux man page] ==System Backups== * Create a script and add it to your <code>crontab -e</code> ===Ba...")
 
No edit summary
Line 1: Line 1:
See [[Archwiki:rsync]] and[https://linux.die.net/man/1/rsync rsync(1) - Linux man page]
See [[Archwiki:rsync]] and [https://linux.die.net/man/1/rsync rsync(1) - Linux man page]


==System Backups==
==System Backups==

Revision as of 06:40, 7 June 2020

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
  • -a archive mode
  • -A preserve ACLs (access control lists)
  • -X preserve extended attributes
  • -q quiet