Проект

Общее

Профиль

USAGE » История » Версия 4

Версия 3 (Dmitry Chernyak, 07.07.2016 13:05) → Версия 4/5 (Dmitry Chernyak, 07.07.2016 13:06)

h1. USAGE

{{toc}}

{{include(ОГЛАВЛЕНИЕ)}}

SkyCover Duply Usage Guidelines

<pre>
All the actions are executing in the command line.
The Windows ™ users should start the CygWin shell.
</pre>

h2. Configuring scduply

If you are planning to save the configuration under /etc (it is available only when running as root), create folder /etc/scduply:

<pre>
mkdir /etc/scduply
</pre>

Otherwise the configuration will be automatically placed into ~/.scduply

<pre>
scduply init
</pre>

In the configuration folder open the file “conf” and set the values:
*GPG_KEY* – set the ID of the GPG key, if you planning to use the key,
*GPG_PW* – set the password for the GPG key, or the password for symmetric encryption (don’t use weak passwords),
*TARGET_URL* – set the path (network or local) to the backup archive storage (the examples are in the configuration file).

h2. Configure the job

<pre>
scduply JOB create
</pre>

JOB – job’s name. The subfolder named JOB will be created and the configuration templates will be placed there.

h3. The source

Open the file “JOB/source” and write there, on the forst line the path to the folder you wish to backup.

The simplest job is complete – you can do the backup right now!

h3. The exclusions

If you need them, open the file “JOB/exclude” and write there the paths, which should be included or excluded in the backup.

<pre>
+ /home/billing
+ /home/www
- **
</pre>

Use the full paths. It is possible to use wildcards. Double star means “all files”.

h3. The individual settings

If needed, you can set individual configuration settings for the backup job in the file “JOB/conf”.

h3. To exclude job from the batch backup

If the job should not be executed in the batch mode via the “bkpall” command, you should create the empty file “JOB/skip”.

h2. Backup

<pre>
scduply JOB backup
</pre>

or, for all jobs

<pre>
scduply bkpall
</pre>

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.

h2. Restore

<pre>
scduply JOB restore DIRECTORY-WHERE
</pre>

h3. Restore for 4 days ago

<pre>
scduply JOB restore DIRECTORY-WHERE 4D
</pre>

h3. Restore for 4 days ago, only subdirectory “will_be_lost”

<pre>
scduply JOB fetch will_be_lost DIRECTORY-WHERE 4D
</pre>

h2. Check status

<pre>
scduply JOB status
</pre>

h2. List files

<pre>
scduply JOB list [AGE]
</pre>

h2. Restore after the losing of the hardware

h3. The minimal set

For restoring of the system in the case of losing the hardware you’ll need:

<pre>
+ Your GPG-key and the password to it (or only the symmetric cryptography password, if the GPG-key is not used).
*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).
+ ssh-key which was used for connecting to the backup storage.
*Suggestion*: make a copy of the ~/.ssh folder.
</pre>

These data need to be copied to the removable media (for ex., USB-Flash) and hold in the secret place, outside the office.

<pre>
The copy of these data must *MANDATORY* be holding by the company’s boss and to be saved outside the office.
</pre>

h3. The full set

The full set, which is needed for restoration with a comfort includes:

<pre>
+ The fresh copy of the settings folder (because it will hold the full list of the jobs, the last exclusion settings etc.);
+ The backup logs and reports.;
+ The ssh-key for access to the backup storage.
</pre>

<pre>
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.
</pre>

The settings are placed in the /etc/scduply folder (if it was preconfigured and scduply is runnig by root) or in the ~/.scduply folder.

The backup logs and reports are writen into /var/log/scduply or in the ~/.scduply/log respectively.

h3. The backup copy of CygWin is not needed

There is no obligation to make the full backup of the CygWin shell, because it can be restored via new setup.

h2. The technical details of scduply

When running as root, scduply uses /etc/scduply folder for the settings.

/etc/scduply should be manually created before the initialization. Otherwise ~/.scduply folder will be automatically created and used.

In the settings folder the global configuration file “conf” is placed, and also the backup job’s profiles subfolders will be created there.

Each subfolder has the files:

<pre>
+ conf – the local job configuration file in which the global settings can be redefined
+ source – the first line of the file is holding the path to the folder to be backed up.
+ exclude – the file of the exclusion wildcards which will be submitted to duplicity with –exclude-globbing-filelist directive
+ descr – the description (the first line) and the notes (all the rest). It is created and used by SkyCover Duply Web frontend.
+ skip – if exists, the backup job will be ignored by bkpall command.
+ 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.
</pre>

While backuping scduply creates the log and the report and places them to the /var/log/scduply folder or to the ~/.scduply/log folder.

h2. Additional information

To be more effective with backuping, please consider the next sources:

<pre>
man duplicity
</pre>

<pre>
sdcuply usage
</pre>

<pre>
man scduply # in the present state - it is a duply man page, which differs only a bit.
</pre>

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.