-
Notifications
You must be signed in to change notification settings - Fork 7
Duplicati Support #53
base: main
Are you sure you want to change the base?
Conversation
2e3fa02
to
98b8d5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the comments in the code, please consider the following:
- Recheck the descriptions. These will appear as they are (no manual modification) in the documentation. So let's ensure that they are well formatted and correct (valid phrases, punctuation, etc.).
- On multiple information, the
set_configuration
method is repeated. Can we create a module-level deploy function to be called on every information? - Ensure that your linters works. The solution class definition raises warnings because of missing
# type: ignore[list-item]
comments. In addition, multiple type annotations are wrong. - In the methods of the helper class, let's use format f-strings. They are more readable than string concatenation.
- Remove the class
DuplicatiHelper
. As all methods are static, it is the same with defining the functions directly in the module. - The commit does not respect the format: the length is greater than 70 characters and the title is not imperative. Please check the
.github/COMMIT_TEMPLATE
. Same for PR: the "Make a list of the modifications you want to apply." remained from the format and there are no labels and assignees, as the issue has (we need to add this mention in the docs too).
By testing the solution in a VM, I can say that there is something with the encryption_test
test. It is not executed at all. Please check if that return of a commands' array is a valid syntax in pyinfra.
import os | ||
import typing | ||
import uuid | ||
from logging.config import IDENTIFIER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this import correct? It may come from IDENTIFIER
access within your operations, but in these places the IDENTIFIER
is a member of the parent object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
|
||
class IncompatibleArchitectureException(BaseSolutionException): | ||
"""Your architecture does not support any teler build.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mistaken solution name here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
ACT = restore_google_drive_backup | ||
|
||
|
||
# info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a forgot comment? The comment dividing the classes is already present below.
|
||
IDENTIFIER = "exclude_files_attributes" | ||
DESCRIPTION = "Don't backup files which have this attribute" | ||
INFO_TYPE = StringDataType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From this comment on Duplicati's forum, I understand that there are multiple attributes that can be excluded. Please transform this into an array of string, such as users may skip multiple file types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
InformationProperties.NON_DEDUCTIBLE, | ||
InformationProperties.WRITABLE, | ||
] | ||
DEFAULT_VALUE = "mutablesecutiy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this hard-coded password. Attach the MANDATORY
property and remove WITH_DEFAULT_VALUE
+ OPTIONAL
.
references: | ||
- https://www.duplicati.com/ | ||
- https://github.com/duplicati/duplicati | ||
maturity: DEV_ONLY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After solving all the change requests, let's set the maturity to PRODUCTION
. We will push this whole module into a future version of MutableSecurity 🎉.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
- https://github.com/duplicati/duplicati | ||
maturity: DEV_ONLY | ||
categories: | ||
- NONE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And add here a BACKUP
category. Don't forget to define it into solution.py
in base
package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
return int(output[0]) != 0 | ||
|
||
IDENTIFIER = "encryption_test" | ||
DESCRIPTION = "Checks if the Duplici local encryption works" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe typo ("Duplici") here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
class ClientCommandPresence(BaseTest): | ||
IDENTIFIER = "command" | ||
DESCRIPTION = "Checks if the Duplici cli is registered as a command." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another possible typo here, "Duplici". And please respect the abbreviation (CLI with uppercase letters) as that text will appear as it is in documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
def process(output: typing.List[str]) -> bool: | ||
return int(output[0]) != 0 | ||
|
||
IDENTIFIER = "encryption_test" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"encryption_test" may be too generic. Let's try to make it more specific (maybe "local_encrypted_backup", just an idea).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
This commit implements support for Duplicati's backups methods: LOCAL, SSH and GOOGLE DRIVE for MutableSecurity. Resolves: #12 Signed-off-by: Ionut Bajan <ionutm.bajan@yahoo.com>
This commit resolves some errors found in the previous version. Resolves: #12 Signed-off-by: Ionut Bajan <ionutm.bajan@yahoo.com>
This commit adds support for creating crontabs for the following: -CrontabLocalBackup, -CrontabSshBackup -CrontabGoogleDriveBackup Resolves: #12 Signed-off-by: Ionut Bajan <ionutm.bajan@yahoo.com>
This commit implements support for removing crontabs when the solution is uninstalled. Resolves: #12 Signed-off-by: Ionut Bajan <ionutm.bajan@yahoo.com>
This commit resolves the problems found in the previous version which have affected all the back-up operations. Resolves: #12 Signed-off-by: Ionut Bajan <ionutm.bajan@yahoo.com>
Metadata
Proposed Changes
New Functioning
Duplicati can be used to securely store encrypted, incremental, compressed backups.
Other Information
The storage providers available in this version are: Local folder, SFTP (SSH) and Google Drive.