• Stars
    star
    455
  • Rank 95,511 (Top 2 %)
  • Language
  • License
    The Unlicense
  • Created about 9 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

rsync-homedir-excludes

This project maintains a list of directories and files you probably do not need to back up, which you can pass to the rsync command's --exclude-from option.

Usage:

# download to `rsync-homedir-local.txt`
wget https://raw.githubusercontent.com/rubo77/rsync-homedir-excludes/master/rsync-homedir-excludes.txt -O rsync-homedir-local.txt
# or clone and copy to `rsync-homedir-local.txt`
git clone https://github.com/rubo77/rsync-homedir-excludes
cd rsync-homedir-excludes
cp rsync-homedir-excludes.txt rsync-homedir-local.txt

# edit the file rsync-homedir-local.txt to your needs
nano rsync-homedir-local.txt

# define a Backup directory (with trailing slash!)
# some examples:
BACKUPDIR=/media/workspace/home/$USER
BACKUPDIR=/media/$USER/linuxbackup/home/$USER
BACKUPDIR=/media/$USER/USBSTICK/backup/home/$USER

# first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:
rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/

# check for permission denied errors in your homedir:
rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied

# if it is all fine, actually perform your backup:
rsync -aP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/

You can edit the exclude file before execution:

  • All lines starting with a # are ignored by rsync, i.e. those directories will be backed up.
  • The syntax doesn't support comments at the end of a line yet.
  • At the start there is a section with directories that are probably not worth backing up. Uncomment those lines to exclude them as well.

Making incremental backups:

When running locally or with the --whole-file option (for backups over SSH), rsync doesn't modify files but replaces them entirely. This allows us to create a snapshot directory (with hardlinks) with the state of the backup directory at a certain point in time.
Run this after finishing the rsync backup and it'll create a new snapshot:

BACKUPDIR=/media/workspace/home/$USER
SNAPSHOT_DIR="$BACKUPDIR.snapshot_$(date +'%Y-%m-%d_%H%M%S' -u)"
cp -al $BACKUPDIR $SNAPSHOT_DIR

Next time you run your backup, the snapshot directory will be intact despite the changes rsync made to the files in the backup directory.

More Repositories

1

log4j_checker_beta

a fast check, if your server could be vulnerable to CVE-2021-44228
Shell
258
star
2

php-mysql-fix

A php include that replaces all mysql functions with the corresponding mysqli functions
PHP
109
star
3

table2CSV

A small JQuery utility which allows you to export any HTML table as CSV file
JavaScript
54
star
4

mouse-speed

Bash script for to increase or decrease the mouse and touchpad speed and the RSI-tool typebreak
Shell
34
star
5

devPixelsPerPx-Toggle

Firefox Add-On Zoom Menu Elements - Zoom all elements by factor 2
JavaScript
19
star
6

set_resolution.py

Python
14
star
7

freifunk-faltblatt-6-seiten

freifunk-flyer 6 Seitig
14
star
8

fix-wordpress-permissions.sh

configures WordPress file permissions based on recommendations from http://codex.wordpress.org/Hardening_WordPress#File_permissions
Shell
13
star
9

mysql-backup.sh

Backup all tables in all databases with ignore list
Shell
11
star
10

gluon-build-script

instruction for build gluon (bash script and wiki text at the same time)
Shell
5
star
11

Coffee-plus-plus

Coffee++ keyboardlayout
5
star
12

remove-old-kernels

Shell
3
star
13

freifunk-red-andy

responsive redmine theme with logo and favicon
CSS
3
star
14

vhost-split.py

Split the same virtualhost configuration across multiple files
Python
2
star
15

timeeffect

online time tracking suite
PHP
2
star
16

batman-connect

Connect to your Freifunk community as node with your local computer
Shell
2
star
17

matrix-dl

Download backlogs from Matrix as raw text - fork of https://gitlab.gnome.org/yarikoptic/matrix-dl
Python
2
star
18

ffki-downloader

HTML
1
star
19

gluon-alt-esc

standalone packages for 2017.1.x of gluon issue #1094
Lua
1
star
20

freifunk-site-conf-scraper

This script downloads all sites from the gluon wiki to build an index
Shell
1
star
21

zoomed-default-font-fix

Fix for zoomed default-font
JavaScript
1
star
22

Win2rightMouseButton

replaces the Left Window key and the Window-key
AutoHotkey
1
star
23

FreifunkForumSearch

Search addon for Firefox in the german forum for openwifi https://forum.freifunk.net
1
star
24

intel-turbo-boost

dis-/enable Intel turbo-boost
Shell
1
star
25

freifunk-sticker

1
star
26

multi-matrix-ansible

1
star
27

Goldkarpfen

git mirror of https://gitlab.com/rubo77/Goldkarpfen
Shell
1
star
28

eliteNameGen

javascript elite name generator
JavaScript
1
star
29

ffmap-backend-bridge

two scripts, that serve ffmap-backend to access alfred and batman data
Shell
1
star
30

Thunderbird-AttachmentExtractor

JavaScript
1
star