Commit e83d3746 authored by Björn's avatar Björn

adding new documentation

parent 908074ce
......@@ -62,14 +62,15 @@ Restore Backup
./backup.py restore --d <path-to-restore>
```
Restore Backup
Restore older Backup
```bash
./backup.py restore --d <path-to-restore> --t <time>
```
Restore Backup single file or directory. Beware if file or directory exists you
need to use --force to overwrite.
Restore Backup single file or directory. Beware! If file or directory exists you
need to use --force to overwrite. The path to restore is also the destination of
a file or a directory.
```bash
./backup.py restore --d <path-to-restore> --t <time> --file-to-restore <path-in-backup>
......@@ -81,17 +82,32 @@ Restore Backup
./backup.py restore --f --d <directory>
```
**[default]**
#### sources
Files and directories to backup, separated with ",".
#### exclude
Files and directories to ignore, separated with ",".
#### remote_host
<username>@<host> this script only supports rsync.
#### remote_target
Directory on server to save backup.
#### gpg_key_recipient
Email of gpg_key.
**sources** files and directories to backup, separated with ","
**exclude** files and directories to ignore, separated with ","
**remote_host** <username>@<host> this script only supports rsync
**remote_target** directory on server to save backup
**gpg_key_recipient** email of gpg_key
**gpg_passphrase** passphrase for gpg_key
**remove_older_than** s, m, h, D, W, M, Y (seconds, minutes, hours, days, weeks, months, years)
**remove_all_but_n_full** count for backups
**remove_all_inc_of_but_n_full** count for backups
#### gpg_passphrase
Passphrase for gpg_key.
#### remove_older_than
s, m, h, D, W, M, Y (seconds, minutes, hours, days, weeks, months, years).
#### remove_all_but_n_full
Count for backups that will be not deleted.
#### remove_all_inc_of_but_n_full**
Count for backups that will be not deleted.
### Storagebox
......@@ -128,9 +144,14 @@ password=
temp=
```
**username** username for mysql-user
**password** password for mysql-user
**temp** path to export sql-files
#### username
Username for mysql-user.
#### password
Password for mysql-user.
#### temp
path to export sql-files.
## GPG-Keys
......
......@@ -112,6 +112,8 @@ class Backup(Config):
# generate string for source and adding all
#
#
# @return None|String
#
def _gpg_key_id(self):
gpg_key_id = None
......
......@@ -60,16 +60,19 @@ class Mysqldump(Config):
self._host = self._config.get('mysql', 'host', fallback='localhost')
self._temp = self._config.get('mysql', 'temp', fallback=None)
# if temp-directory not set
if (not self._temp):
print(colored('Temp-Directory not set!', 'yellow'))
print(colored('Mysql Failed! Exit Script!', 'red'))
exit()
# if temp-directory not exists
if (os.path.exists(self._temp) == False):
print(colored(self._temp + ' not exists!', 'yellow'))
print(colored('Mysql Failed! Exit Script!', 'red'))
exit()
# if temp-directory is not a directory
if (os.path.isdir(self._temp) == False):
print(colored(self._temp + ' is not a directory!', 'yellow'))
print(colored('Mysql Failed! Exit Script!', 'red'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment