2015-08-30 08:42:32 +00:00
|
|
|
|
# rsync-homedir-excludes
|
|
|
|
|
|
2016-06-30 12:56:24 +00:00
|
|
|
|
## Usage:
|
2015-08-30 08:42:32 +00:00
|
|
|
|
|
2016-04-28 08:30:09 +00:00
|
|
|
|
# download to `/var/tmp/ignorelist`
|
|
|
|
|
wget https://raw.githubusercontent.com/rubo77/rsync-homedir-excludes/master/rsync-homedir-excludes.txt -O /var/tmp/ignorelist
|
|
|
|
|
# or copy to `/var/tmp/ignorelist`
|
|
|
|
|
cp ./rsync-homedir-excludes.txt /var/tmp/ignorelist
|
2015-10-15 07:31:59 +00:00
|
|
|
|
|
2016-04-28 08:30:09 +00:00
|
|
|
|
# edit the file /var/tmp/ignorelist to your needs
|
|
|
|
|
nano /var/tmp/ignorelist
|
|
|
|
|
|
|
|
|
|
# define a Backup directory, for example:
|
|
|
|
|
BACKUPDIR=/media/$USER/linuxbackup/home/$USER/
|
|
|
|
|
BACKUPDIR=/media/workspace/home/$USER/
|
|
|
|
|
|
|
|
|
|
# first append the “-n” parameter rsync will simulate the operation. you should use this before you start:
|
|
|
|
|
rsync -naP --exclude-from=/var/tmp/ignorelist /home/$USER/ $BACKUPDIR
|
|
|
|
|
|
2017-04-24 07:43:16 +00:00
|
|
|
|
#check for permission denied errors in your homedir:
|
|
|
|
|
rsync -naP --exclude-from=/var/tmp/ignorelist /home/$USER/ $BACKUPDIR|grep denied
|
2016-04-28 08:30:09 +00:00
|
|
|
|
|
2017-04-24 07:43:16 +00:00
|
|
|
|
# if it is all fine, start your backup with
|
2016-04-28 08:30:09 +00:00
|
|
|
|
rsync -aP --exclude-from=/var/tmp/ignorelist /home/$USER/ $BACKUPDIR
|
|
|
|
|
|
2016-07-02 02:26:12 +00:00
|
|
|
|
You can edit the ignorelist file before execution as it serves you well:
|
|
|
|
|
|
|
|
|
|
- At the start, there is a section with directories, probably not worth a backup. Uncomment those lines to exclude them as well.
|
|
|
|
|
|
|
|
|
|
- All lines starting with a `#` are being ignored.
|
|
|
|
|
|
2016-08-29 10:20:26 +00:00
|
|
|
|
- The syntax doesn't support comments at the end of a line yet.
|