USAGE » История » Версия 3
Dmitry Chernyak, 07.07.2016 13:05
1 | 1 | Александр Кобуз | h1. USAGE |
---|---|---|---|
2 | 1 | Александр Кобуз | |
3 | 3 | Dmitry Chernyak | {{include(ОГЛАВЛЕНИЕ)}} |
4 | 3 | Dmitry Chernyak | |
5 | 1 | Александр Кобуз | SkyCover Duply Usage Guidelines |
6 | 1 | Александр Кобуз | |
7 | 1 | Александр Кобуз | <pre> |
8 | 1 | Александр Кобуз | All the actions are executing in the command line. |
9 | 1 | Александр Кобуз | The Windows ™ users should start the CygWin shell. |
10 | 1 | Александр Кобуз | </pre> |
11 | 1 | Александр Кобуз | |
12 | 1 | Александр Кобуз | h2. Configuring scduply |
13 | 1 | Александр Кобуз | |
14 | 1 | Александр Кобуз | If you are planning to save the configuration under /etc (it is available only when running as root), create folder /etc/scduply: |
15 | 1 | Александр Кобуз | |
16 | 1 | Александр Кобуз | <pre> |
17 | 1 | Александр Кобуз | mkdir /etc/scduply |
18 | 1 | Александр Кобуз | </pre> |
19 | 1 | Александр Кобуз | |
20 | 1 | Александр Кобуз | Otherwise the configuration will be automatically placed into ~/.scduply |
21 | 1 | Александр Кобуз | |
22 | 1 | Александр Кобуз | <pre> |
23 | 1 | Александр Кобуз | scduply init |
24 | 1 | Александр Кобуз | </pre> |
25 | 1 | Александр Кобуз | |
26 | 1 | Александр Кобуз | In the configuration folder open the file “conf” and set the values: |
27 | 1 | Александр Кобуз | *GPG_KEY* – set the ID of the GPG key, if you planning to use the key, |
28 | 1 | Александр Кобуз | *GPG_PW* – set the password for the GPG key, or the password for symmetric encryption (don’t use weak passwords), |
29 | 1 | Александр Кобуз | *TARGET_URL* – set the path (network or local) to the backup archive storage (the examples are in the configuration file). |
30 | 1 | Александр Кобуз | |
31 | 1 | Александр Кобуз | h2. Configure the job |
32 | 1 | Александр Кобуз | |
33 | 1 | Александр Кобуз | <pre> |
34 | 1 | Александр Кобуз | scduply JOB create |
35 | 1 | Александр Кобуз | </pre> |
36 | 1 | Александр Кобуз | |
37 | 1 | Александр Кобуз | JOB – job’s name. The subfolder named JOB will be created and the configuration templates will be placed there. |
38 | 1 | Александр Кобуз | |
39 | 1 | Александр Кобуз | h3. The source |
40 | 1 | Александр Кобуз | |
41 | 1 | Александр Кобуз | Open the file “JOB/source” and write there, on the forst line the path to the folder you wish to backup. |
42 | 1 | Александр Кобуз | |
43 | 1 | Александр Кобуз | The simplest job is complete – you can do the backup right now! |
44 | 1 | Александр Кобуз | |
45 | 1 | Александр Кобуз | h3. The exclusions |
46 | 1 | Александр Кобуз | |
47 | 1 | Александр Кобуз | If you need them, open the file “JOB/exclude” and write there the paths, which should be included or excluded in the backup. |
48 | 1 | Александр Кобуз | |
49 | 1 | Александр Кобуз | <pre> |
50 | 1 | Александр Кобуз | + /home/billing |
51 | 1 | Александр Кобуз | + /home/www |
52 | 1 | Александр Кобуз | - ** |
53 | 1 | Александр Кобуз | </pre> |
54 | 1 | Александр Кобуз | |
55 | 1 | Александр Кобуз | Use the full paths. It is possible to use wildcards. Double star means “all files”. |
56 | 1 | Александр Кобуз | |
57 | 1 | Александр Кобуз | h3. The individual settings |
58 | 1 | Александр Кобуз | |
59 | 1 | Александр Кобуз | If needed, you can set individual configuration settings for the backup job in the file “JOB/conf”. |
60 | 1 | Александр Кобуз | |
61 | 1 | Александр Кобуз | h3. To exclude job from the batch backup |
62 | 1 | Александр Кобуз | |
63 | 1 | Александр Кобуз | If the job should not be executed in the batch mode via the “bkpall” command, you should create the empty file “JOB/skip”. |
64 | 1 | Александр Кобуз | |
65 | 1 | Александр Кобуз | h2. Backup |
66 | 1 | Александр Кобуз | |
67 | 1 | Александр Кобуз | <pre> |
68 | 1 | Александр Кобуз | scduply JOB backup |
69 | 1 | Александр Кобуз | </pre> |
70 | 1 | Александр Кобуз | |
71 | 1 | Александр Кобуз | or, for all jobs |
72 | 1 | Александр Кобуз | |
73 | 1 | Александр Кобуз | <pre> |
74 | 1 | Александр Кобуз | scduply bkpall |
75 | 1 | Александр Кобуз | </pre> |
76 | 1 | Александр Кобуз | |
77 | 1 | Александр Кобуз | If the global configuration file has the settings for MAIL_TO, MAIL_FROM, MAIL_SUBJECT and MAIL_CMD parameters, then bkpall will mail the report with the backup summary and the raw backup log. |
78 | 1 | Александр Кобуз | |
79 | 1 | Александр Кобуз | h2. Restore |
80 | 1 | Александр Кобуз | |
81 | 1 | Александр Кобуз | <pre> |
82 | 1 | Александр Кобуз | scduply JOB restore DIRECTORY-WHERE |
83 | 1 | Александр Кобуз | </pre> |
84 | 1 | Александр Кобуз | |
85 | 1 | Александр Кобуз | h3. Restore for 4 days ago |
86 | 1 | Александр Кобуз | |
87 | 1 | Александр Кобуз | <pre> |
88 | 1 | Александр Кобуз | scduply JOB restore DIRECTORY-WHERE 4D |
89 | 1 | Александр Кобуз | </pre> |
90 | 1 | Александр Кобуз | |
91 | 1 | Александр Кобуз | h3. Restore for 4 days ago, only subdirectory “will_be_lost” |
92 | 1 | Александр Кобуз | |
93 | 1 | Александр Кобуз | <pre> |
94 | 1 | Александр Кобуз | scduply JOB fetch will_be_lost DIRECTORY-WHERE 4D |
95 | 1 | Александр Кобуз | </pre> |
96 | 1 | Александр Кобуз | |
97 | 1 | Александр Кобуз | h2. Check status |
98 | 1 | Александр Кобуз | |
99 | 1 | Александр Кобуз | <pre> |
100 | 1 | Александр Кобуз | scduply JOB status |
101 | 1 | Александр Кобуз | </pre> |
102 | 1 | Александр Кобуз | |
103 | 1 | Александр Кобуз | h2. List files |
104 | 1 | Александр Кобуз | |
105 | 1 | Александр Кобуз | <pre> |
106 | 1 | Александр Кобуз | scduply JOB list [AGE] |
107 | 1 | Александр Кобуз | </pre> |
108 | 1 | Александр Кобуз | |
109 | 1 | Александр Кобуз | h2. Restore after the losing of the hardware |
110 | 1 | Александр Кобуз | |
111 | 1 | Александр Кобуз | h3. The minimal set |
112 | 1 | Александр Кобуз | |
113 | 1 | Александр Кобуз | For restoring of the system in the case of losing the hardware you’ll need: |
114 | 1 | Александр Кобуз | |
115 | 1 | Александр Кобуз | <pre> |
116 | 1 | Александр Кобуз | + Your GPG-key and the password to it (or only the symmetric cryptography password, if the GPG-key is not used). |
117 | 1 | Александр Кобуз | *Suggestion*: make the copy of the settings folder (AFTER the first success backup session – it will hold thr exported copy of the GPG-key and the other settings). |
118 | 1 | Александр Кобуз | + ssh-key which was used for connecting to the backup storage. |
119 | 1 | Александр Кобуз | *Suggestion*: make a copy of the ~/.ssh folder. |
120 | 1 | Александр Кобуз | </pre> |
121 | 1 | Александр Кобуз | |
122 | 1 | Александр Кобуз | |
123 | 1 | Александр Кобуз | These data need to be copied to the removable media (for ex., USB-Flash) and hold in the secret place, outside the office. |
124 | 1 | Александр Кобуз | |
125 | 1 | Александр Кобуз | <pre> |
126 | 1 | Александр Кобуз | The copy of these data must *MANDATORY* be holding by the company’s boss and to be saved outside the office. |
127 | 1 | Александр Кобуз | </pre> |
128 | 1 | Александр Кобуз | |
129 | 2 | Александр Кобуз | h3. The full set |
130 | 1 | Александр Кобуз | |
131 | 1 | Александр Кобуз | The full set, which is needed for restoration with a comfort includes: |
132 | 1 | Александр Кобуз | |
133 | 2 | Александр Кобуз | <pre> |
134 | 2 | Александр Кобуз | + The fresh copy of the settings folder (because it will hold the full list of the jobs, the last exclusion settings etc.); |
135 | 2 | Александр Кобуз | + The backup logs and reports.; |
136 | 2 | Александр Кобуз | + The ssh-key for access to the backup storage. |
137 | 2 | Александр Кобуз | </pre> |
138 | 2 | Александр Кобуз | |
139 | 2 | Александр Кобуз | <pre> |
140 | 1 | Александр Кобуз | It will be a good idea to save in the safe and secret place the GPG-key, the password and the ssh-key as it was mentioned above and to set up the additional backup job for saving all the settings and logs on the standard backup storage. |
141 | 2 | Александр Кобуз | </pre> |
142 | 1 | Александр Кобуз | |
143 | 1 | Александр Кобуз | The settings are placed in the /etc/scduply folder (if it was preconfigured and scduply is runnig by root) or in the ~/.scduply folder. |
144 | 1 | Александр Кобуз | |
145 | 1 | Александр Кобуз | The backup logs and reports are writen into /var/log/scduply or in the ~/.scduply/log respectively. |
146 | 1 | Александр Кобуз | |
147 | 2 | Александр Кобуз | h3. The backup copy of CygWin is not needed |
148 | 1 | Александр Кобуз | |
149 | 1 | Александр Кобуз | There is no obligation to make the full backup of the CygWin shell, because it can be restored via new setup. |
150 | 1 | Александр Кобуз | |
151 | 2 | Александр Кобуз | h2. The technical details of scduply |
152 | 1 | Александр Кобуз | |
153 | 1 | Александр Кобуз | When running as root, scduply uses /etc/scduply folder for the settings. |
154 | 1 | Александр Кобуз | |
155 | 1 | Александр Кобуз | /etc/scduply should be manually created before the initialization. Otherwise ~/.scduply folder will be automatically created and used. |
156 | 1 | Александр Кобуз | |
157 | 1 | Александр Кобуз | In the settings folder the global configuration file “conf” is placed, and also the backup job’s profiles subfolders will be created there. |
158 | 1 | Александр Кобуз | |
159 | 1 | Александр Кобуз | Each subfolder has the files: |
160 | 1 | Александр Кобуз | |
161 | 2 | Александр Кобуз | <pre> |
162 | 2 | Александр Кобуз | + conf – the local job configuration file in which the global settings can be redefined |
163 | 2 | Александр Кобуз | + source – the first line of the file is holding the path to the folder to be backed up. |
164 | 2 | Александр Кобуз | + exclude – the file of the exclusion wildcards which will be submitted to duplicity with –exclude-globbing-filelist directive |
165 | 2 | Александр Кобуз | + descr – the description (the first line) and the notes (all the rest). It is created and used by SkyCover Duply Web frontend. |
166 | 2 | Александр Кобуз | + skip – if exists, the backup job will be ignored by bkpall command. |
167 | 2 | Александр Кобуз | + saved.env, gpg*.asc – the files holding the information which is required to restore data to the new computer. They are created automatically while backuping. |
168 | 2 | Александр Кобуз | </pre> |
169 | 2 | Александр Кобуз | |
170 | 1 | Александр Кобуз | While backuping scduply creates the log and the report and places them to the /var/log/scduply folder or to the ~/.scduply/log folder. |
171 | 1 | Александр Кобуз | |
172 | 2 | Александр Кобуз | h2. Additional information |
173 | 1 | Александр Кобуз | |
174 | 1 | Александр Кобуз | To be more effective with backuping, please consider the next sources: |
175 | 1 | Александр Кобуз | |
176 | 2 | Александр Кобуз | <pre> |
177 | 1 | Александр Кобуз | man duplicity |
178 | 2 | Александр Кобуз | </pre> |
179 | 2 | Александр Кобуз | |
180 | 2 | Александр Кобуз | <pre> |
181 | 1 | Александр Кобуз | sdcuply usage |
182 | 2 | Александр Кобуз | </pre> |
183 | 2 | Александр Кобуз | |
184 | 2 | Александр Кобуз | <pre> |
185 | 1 | Александр Кобуз | man scduply # in the present state - it is a duply man page, which differs only a bit. |
186 | 2 | Александр Кобуз | </pre> |
187 | 2 | Александр Кобуз | |
188 | 2 | Александр Кобуз | The file "CHANGES":https://raw.githubusercontent.com/skycover/scduply/master/CHANGES in the scduply’s source code is holding the brief difference description against duply. |