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