Commit Graph

89 Commits

Author SHA1 Message Date
Bahtiar `kalkin-` Gadimov
61feb0ced7
Migrate backup to new storage api 2016-07-13 22:34:37 +02:00
Bahtiar `kalkin-` Gadimov
bb8b58b04c
qubes.backup fix verify_files 2016-07-13 22:34:36 +02:00
Bahtiar `kalkin-` Gadimov
b584d1a4bb
Remove QubesVM.is_netvm() and is_disposablevm() 2016-06-23 14:23:33 +02:00
Bahtiar `kalkin-` Gadimov
4a0b7585d1
Remove QubesVM.is_proxyvm() 2016-06-23 14:23:32 +02:00
Bahtiar `kalkin-` Gadimov
e08ca1ff57
Remove QubesVM.is_template() 2016-06-23 14:23:31 +02:00
Bahtiar `kalkin-` Gadimov
0a471e719b
qubes.backup fix access to volume paths 2016-06-21 14:58:09 +02:00
Marek Marczykowski-Górecki
98effef606
backup: add option to use default kernel for restored VMs 2016-06-16 17:06:42 +02:00
Marek Marczykowski-Górecki
91404cc647
backup: collect files to backup once 2016-06-16 17:06:41 +02:00
Marek Marczykowski-Górecki
2dacb3a542
backup: drop/resolve minor "TODO" comments 2016-06-16 17:06:41 +02:00
Marek Marczykowski-Górecki
2909d252d6 backup: get_fisk_usage is now in storage.file 2016-06-02 12:41:59 +02:00
Marek Marczykowski-Górecki
8c6fe7ed90
Merge remote-tracking branch 'origin/master' into core3-devel-mm 2016-04-11 13:03:12 +02:00
Marek Marczykowski-Górecki
d9a8cd5d68
backup: minor code style fixes 2016-04-11 00:13:13 +02:00
Marek Marczykowski-Górecki
c28f50f6fe backup: minor fixes 2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
2261e6a4c7 backup: simplify auto-renaming handling
Don't try to track names in restore_info_verify, instead resolve them at
actual restore time.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
71a7730168 backup: simplify ordering of restoring VMs
No other change than reducing two nested loops into one.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
98c8b7cd22 backup: use simple classes for data storage on restore too 2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
424d3054f3 backup: use vm.features to store backup-specific metadata
Do not keep them in system qubes.xml.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
ed88b5a9a3 backup: use vm.run_service instead of vm.run
This should be the only way used to call services.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
e8f21929ad backup: by default include all the VMs with vm.include_in_backups
If there is a need for more robust default, it should be handled at that
property.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
a3051b956b backup: docstrings, don't expose internal attributes
processes_to_kill_on_cancel shouldn't be initialized by user, so move
below applying user settings.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
b4227f7581 backup: use simple classes instead of hashes, use events for appmenus
This makes typo errors much easier to find (also using pylint or so).
While at it, also removed explicit appmenus backup, as it should be
provided by appmenus extension.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
c01f43a5d3 backup: unify handling of template and non-template VMs
Handle them the same way - individual files, not the whole directory for
templates.
Also don't backup obsolete 'kernels' subdir - it isn't supported in
core3.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
d9cf64a41d backup: minor code structure changes
- initialize internal objects object in constructor
- use 'with'
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
78dbadab57 backup: minor: compile regex once 2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
e9b8b6428c backup: remove duplicated get_disk_usage function 2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
c08f5986a9 backup: use constants for queue control strings 2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
ad1f1738fa qubes: make 'store' property public (R/O)
It makes sense to see from what Qubes object was loaded.
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
8c5d42a095 backup: add support for restoring pre-core3 backups 2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
304d2b10bc backup: fix handline "None" kernel 2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
412bcfa88b backup: fix hadling netvm property 2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
d72d8f8445 backup: code inspection annotations 2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
3fb0754398 backup: formatting 2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
697a26c8da backup: update license header
Use link instead of address, as recommended by FSF.
2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
e04ea7512c backup: minor code style
- Don't use catch-all except statement.
- Use str.format instead of "%" operator.
- Use static methods where applicable.
- Remove unused local variables.
- Don't shadow variables from outer scope
2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
e5af64f2bf backup: fix restore summary table 2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
595dfdc0a9 backup: add additional verification of backup header
Ensure only alphanumeric characters are used.
2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
3342f637f4 backup: convert logging to proper python logging API
QubesOS/qubes-issues#1213
QubesOS/qubes-issues#1214
2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
e557fe9989 backup: restructude the code into classes
Introduce two main classes Backup and BackupRestore for storing the
state of the desired operation. Then a simple interface to adjust
parameters.

(Almost) no functional change.

QubesOS/qubes-issues#1213
QubesOS/qubes-issues#1214
2016-04-07 13:06:14 +02:00
Marek Marczykowski-Górecki
e0686e1e02 backup: initial conversion to core3 API 2016-04-07 13:05:25 +02:00