1190 Commits

Author SHA1 Message Date
Joseph Nuthalapati
c33b192f71
backups: Don't rely on disk labels during export/restore
Disk labels are unreliable. They may not exist. There are not unique and two
disks in the system may have the same label. Instead use the device path of the
disk/partition.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-22 19:26:22 -04:00
Joseph Nuthalapati
b29ccfc060
storage: Minor styling with urlencode call in template
For consistency.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-22 19:26:20 -04:00
Joseph Nuthalapati
d5860ac179
backups: Fix issue with showing exports from disks without labels
When a disk does not have a label, its device path is used. This contains a '/'
which by default is not encoded by 'urlencode' filter in Django templates. This
leads to the expected URL not matching the regex in urls.py. Fix this by
ensuring that '/' is also encoded by 'urlencode'.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-22 19:26:17 -04:00
Joseph Nuthalapati
4297983ff1
storage: Enable backup/restore (no data)
There might be data to backup in future if we allow configuration. Currently, it
is just an assurance to the user that there is no data to backup.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-21 19:19:41 -04:00
Joseph Nuthalapati
b22c12b912
power: Enable backup/restore (no data)
There might be data to backup in future if we allow configuration. Currently, it
is just an assurance to the user that there is no data to backup.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-21 19:19:37 -04:00
Joseph Nuthalapati
f362ce937e
names: Enable backup/restore (no data)
There might be data to backup in future if we allow customizing domain
configuration. Currently, it is just an assurance to the user that there is no
data to backup.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-21 19:19:21 -04:00
Joseph Nuthalapati
1fb30ba55f
diagnostics: Enable backup/restore (no data)
There might be data to backup in future if we allow configuration. Currently, it
is just an assurance to the user that there is no data to backup.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-21 19:19:16 -04:00
Joseph Nuthalapati
ce318350a9
firewall: Enable backup/restore (no data)
There might be data to backup in future if we allow adding custom rules or
provide features such as blocking untrusted devices at home. Currently, it is
just an assurance to the user that there is no data to backup.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-21 19:19:09 -04:00
Joseph Nuthalapati
1eacbf1be7
ssh: Enable backup/restore
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-21 19:19:05 -04:00
Joseph Nuthalapati
03a6cf25e5
snapshot: Enable backup/restore
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-21 19:18:56 -04:00
Joseph Nuthalapati
316d765629
backups: Implement app hooks
Each application will be able to implement backup_pre, backup_post, restore_pre
and restore_post hooks that get called before/after backup/restore
appropriately. This is to handle any edge cases that backup manifest mechanism
does not handle.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-21 19:18:50 -04:00
Joseph Nuthalapati
327741bc22
security: Enable backup/restore
Currently only the restricted login setting is backed up and restored. Fail2Ban
needs ability to backup and restore state of services.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-21 19:18:30 -04:00
Joseph Nuthalapati
03e19b0bdc
bind: Enable backup/restore
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-21 19:18:22 -04:00
Joseph Nuthalapati
6cfd5774f0
backups: Enable backup/restore (no data currently)
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-21 19:18:11 -04:00
Joseph Nuthalapati
02307f4d10
avahi: Enable backup/restore (no data)
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-21 19:18:05 -04:00
Joseph Nuthalapati
73bfcc41f9
deluge: Enable backup/restore
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-21 19:17:59 -04:00
Joseph Nuthalapati
962fb0d678
datetime: Enable backup/restore
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-15 16:12:49 -04:00
Michael Pimmer
d01c36a8f5
Backups: bugfix for downloading extracted archive files
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-15 15:10:02 -04:00
Joseph Nuthalapati
1307e474da
customization: Show custom shortcuts on frontpage
Closes #1379

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-08 20:30:29 -04:00
Joseph Nuthalapati
5e06017e5c
customization: Serve custom shortcuts through the REST API
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-08 20:30:24 -04:00
Joseph Nuthalapati
78f1737788
pagekite: Enable backup/restore
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-08 18:29:16 -04:00
Joseph Nuthalapati
382e23636a
pagekite: Add functional tests
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-08 18:29:11 -04:00
Joseph Nuthalapati
3ec55ddecd
sharing: Enable backup/restore
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-08 18:29:05 -04:00
Joseph Nuthalapati
b18a80f0f2
backups: Implement disabling web configuration during backup
- Introduce a BackupApp class to store all information about application being
  backed up. This cleans up apps lists vs. manifest lists spread out in the
  code.

- Introduce ServiceHandler to abstract dealing with services and web
  configuration.

- Add enable and disable actions in apache action.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-08 18:28:54 -04:00
Joseph Nuthalapati
5ee0f71e62
shadowsocks: Enable backup/restore
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-08 18:28:45 -04:00
Joseph Nuthalapati
5f15fdda45
quassel: Enable backup/restore
- All the configuration is in data folder, no custom configuration.

- SSL certificate is in the data folder.

- Users, logs etc. are in sqlite file in the data folder.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-08 18:28:26 -04:00
Joseph Nuthalapati
9305afea9c
mediawiki: Run update script for 1.31 upgrade
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-10-08 11:01:29 +05:30
Joseph Nuthalapati
e001a37449
transmission: Enable backup/restore
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-03 19:19:17 -04:00
Joseph Nuthalapati
95664015ac
coquelicot: Enable backup/restore
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-03 19:19:09 -04:00
Joseph Nuthalapati
8a2e27e8e0
jsxc: Enable backup/restore (no data)
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-03 19:19:05 -04:00
Joseph Nuthalapati
12620fe7c0
searx: Enable backup/restore (no data)
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-03 19:19:03 -04:00
Joseph Nuthalapati
6cb37ac19e
roundcube: Enable backup/restore (no data)
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-03 19:19:01 -04:00
Joseph Nuthalapati
8df5b09d0a
privoxy: Enable backup/restore (no data)
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-03 19:18:58 -04:00
Joseph Nuthalapati
4b3a3483a9
mumble: Implement backup/restore
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-03 19:18:56 -04:00
Joseph Nuthalapati
eb490e6faa
cockpit: Add clients and backup manifests
- Clients information allows us to show launch web interface button consistently
  like other applications instead of showing it in the description.

- Empty backup information allows for the application to be installed when a
  backup is restored.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-03 19:18:54 -04:00
Joseph Nuthalapati
0be12affba
backups: Minor styling fixes
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-03 19:18:52 -04:00
Joseph Nuthalapati
8d7ede728e
backups: List apps that don't require backup too
- This serves two purposes. First is to assure user in the interface that backup
  of the module is not required. Second is to make sure that if an application
  is installed during backup it is also reinstalled during restore process (this
  need to be implemented).

- Allow backup test to run independently. Initialize the cfg module so that
  load_modules() works.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-03 19:18:50 -04:00
Joseph Nuthalapati
26764b7370
backups: Rename test_backup to test_api
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-03 19:18:48 -04:00
Joseph Nuthalapati
852455b519
mediawiki: Backup/restore settings also
Closes #1392.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-03 19:18:45 -04:00
Joseph Nuthalapati
0ce97005b2
backups: Rename the backups API module
- Also other minor refactoring.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-03 19:18:43 -04:00
Joseph Nuthalapati
d48ab72cf0
backups: Remove empty keys in backup manifest data
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-03 19:18:41 -04:00
Joseph Nuthalapati
6b8b40cda6
backups: Relax schema for backup manifest data
Only check validity of keys if they are present. Allows writing simpler manifest
files without losing any information.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-03 19:18:37 -04:00
Michael Pimmer
d8fc2057d4
Backup module: added some unittests; minor doc updates
- added unittests
- introduced function backups.get_location_path()
- minor docstring / comment and naming updates

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-01 07:01:03 -04:00
Michael Pimmer
7da361bbca
Backup module: Implemented uploading files
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-01 07:00:57 -04:00
Michael Pimmer
35446f2ca4
Backup module: Implement downloading archives
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-10-01 07:00:51 -04:00
Joseph Nuthalapati
a307476634
udiskie: Merge into storage module
udiskie is now an essential module that will be installed along with storage.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-09-24 18:04:50 -04:00
Joseph Nuthalapati
f172925d9d
backups: Simplify getting included apps during restoring
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-09-24 19:46:54 +05:30
Joseph Nuthalapati
f2528c434d
backups: Minor refactoring in finding exported archive
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-09-24 19:46:47 +05:30
Joseph Nuthalapati
670f58019e
backups: Minor styling fixes
- More descriptive iteration variables
- Run yafp, isort

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-09-24 19:46:39 +05:30
Joseph Nuthalapati
dc781b03fa
backups: Make getting all apps method public
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2018-09-24 19:46:18 +05:30