Compare commits
9 Commits
8c0bd6b785
...
main
Author | SHA1 | Date | |
---|---|---|---|
b477b945a1 | |||
8e90cd5a83 | |||
5edea5168d | |||
e4e9ef714b | |||
de3d71d2d9 | |||
d1615920ec | |||
ea42e14006 | |||
a7b9f7433d | |||
2c9f03ee52 |
0
.gitignore
vendored
Normal file
0
.gitignore
vendored
Normal file
@@ -9,6 +9,7 @@
|
||||
# Flatpack
|
||||
.var/app/*/cache
|
||||
.var/app/*/.cache
|
||||
.var/app/org.telegram.desktop/data/TelegramDesktop/tdata/user_data
|
||||
|
||||
# Recently used files
|
||||
.local/share/RecentDocuments
|
||||
@@ -35,6 +36,9 @@ Thumbs.db
|
||||
.config/google-chrome/*/History Index *
|
||||
.config/google-chrome/*/Service Worker/CacheStorage
|
||||
.config/google-chrome/*/WebStorage/*/CacheStorage
|
||||
.config/google-chrome/SingletonCookie
|
||||
.config/google-chrome/SingletonLock
|
||||
.config/google-chrome/SingletonSocket
|
||||
|
||||
# VS Code
|
||||
.config/Code/logs/
|
||||
@@ -46,3 +50,4 @@ go/pkg/mod/cache
|
||||
|
||||
# Java
|
||||
.java
|
||||
|
||||
|
10
.rsync-plex-ignore
Normal file
10
.rsync-plex-ignore
Normal file
@@ -0,0 +1,10 @@
|
||||
Preferences.bak
|
||||
.LocalAdminToken
|
||||
plexmediaserver.pid
|
||||
Cache/*
|
||||
Codecs/*
|
||||
Crash Reports/*
|
||||
Diagnostics/*
|
||||
Drivers/*
|
||||
Logs/*
|
||||
Updates/*
|
@@ -3,12 +3,13 @@ This project maintains a list of directories and files you probably do not need
|
||||
|
||||
## Usage:
|
||||
|
||||
```
|
||||
# download to `.rsync-ignore`
|
||||
wget https://gitaly.ru/anpleenko/rsync/raw/branch/main/.rsync-ignore -O .rsync-ignore
|
||||
curl https://gitaly.ru/anpleenko/rsync/raw/branch/main/.rsync-ignore > .rsync-ignore
|
||||
# or clone and copy to `.rsync-ignore`
|
||||
git clone https://gitaly.ru/anpleenko/rsync
|
||||
cd rsync-homedir-excludes
|
||||
cp rsync-homedir-excludes.txt .rsync-ignore
|
||||
cd rsync
|
||||
|
||||
# edit the file .rsync-ignore to your needs
|
||||
nano .rsync-ignore
|
||||
@@ -27,6 +28,7 @@ This project maintains a list of directories and files you probably do not need
|
||||
|
||||
# if it is all fine, actually perform your backup:
|
||||
rsync -aP --exclude-from=.rsync-ignore /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.
|
||||
@@ -37,8 +39,10 @@ You can edit the exclude file before execution:
|
||||
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.
|
||||
|
Reference in New Issue
Block a user