-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
111 lines (68 loc) · 2.89 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
rsyncrestore
Shell (bash) script which uses rsync and inotify-tools for making simple,
flexible and effective multiuser file synchronizing tool.
License: GPL, http://www.gnu.org/licenses/gpl.html
URL: https://github.com/lora/rsyncrestore
1. Introduction
2. Requirements
3. Installation
4. Usage
1. Introduction
rsyncrestore is basicly synchronizing your folder(s) with an another
folder. This folder can be a local folder on your computer (i.e. external
USB hard disk) or a folder on a remote server (with running SSH server).
Idea for writing rsyncrestore came from the wish to use Dropbox securely.
But do you really want to share your private data with some unknown
servers, clouds? I did not want to do that and I used Christmas break to
solve this problem with rsync and inotify-tools.
Target folders on the server will contain separate backup folders for
every single day. These folders are incremental copies of folders on your
computer and are hard links of the day before. Folder structure looks
like this:
SERVER-FOLDER/
2010-12-20/
2010-12-21/
2010-12-23/
2010-12-27/
2. Requirements
rsyncrestore depends on rsync and inotify-tools. Everthing else should be
part of every Linux distribution. Cygwin should also work but I did not
test it.
Use apt-get to install rsync and inotify-tools on Ubuntu and other distros:
# sudo apt-get install rsync inotify-tools
Other distros have similar tools. If not you can download rsync from
http://samba.anu.edu.au/rsync/ and inotify-tools from sourceforge
http://inotify-tools.sourceforge.net/ and compile it by yourself.
3. Installation
a) Download rsyncrestore from https://github.com/lora/rsyncrestore
b) Save rsyncrestore file. Put it in /usr/bin to make it accessible for
all users
b) Make it executable: chmod +x rsyncrestore
c) Run it: ./rsyncrestore
4. Usage
When you run rsyncrestore first time "config" file will be created in
~/.rsyncrestore/ folder. You will have to set some basic settings in
this file before you using rsyncrestore:
a) SYNC_LOCAL_FOLDER
Your folders which you want to sync. Split multiple folders with space.
Example:
SYNC_LOCAL_FOLDER="/home /etc /mnt/your\ folder"
b) SYNC_SERVER_FOLDER
Your target folder (on the server) where your files will be saved. Only
one target folder can be set.
Example:
SYNC_SERVER_FOLDER="/mnt/sync-backup"
c) SYNC_SERVER_HOST
username@hostname of your server. Copy your ssh key to your server to
allow automatic passwordless login for rsync. Here is a link to a howto
for copying ssh key: https://encrypted.google.com/search?q=ssh+key+passwordless
Example:
SYNC_SERVER_HOST="[email protected]"
d) TEST_MODE
TEST_MODE is by default set to YES just to be able to test everything.
No data will be changed if TEST_MODE is set ot YES. You will have to
set it to "NO" to use rsyncrestore.
Example:
TEST_MODE="NO"
e) Other options
All other options are explained directly in config file.