- Only do the configuration based on version run the remaining setup code
without considering version.
- Don't force upgrade/setup configuration when doing from version 4 and above.
- Force set cleanup=yes values during migration too.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
- Added a command-line argument called --old-version to the setup command based
on which it can decide whether to do a new setup or a migration.
- Removed the migrate command.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
The free space limit value is allowed to a maximum of 60%, since setting the
it to a value higher than possible will effectively disable snapshotting.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org
- Snapper's cleanup algorithms don't apply limits unless they are specified in
the form of ranges. Changed all limit values in the configuration to ranges.
- Also, all MIN_AGE values have been set to 0 to avoid the disk space filling up
in case of a large number of snapshots generated in a very short amount of time.
- FREE_LIMIT has been increased to 30% from the default 20% since backup
archives also take up disk space on the root partition.
Fixes#1435
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
The latest snapper returns the currently active snapshot like "4*", which
interferes with both the urls and the templates. Stripping off the unnecessary
asterisk since we have better ways of detecting what the currently active
snapshot is.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
snapper set-config expects each key-value pair to be passed as a separate
argument separated by '='.
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Change `configure` command to `set-config` for consistency with `get-config`
- Run `set-config` as superuser
Fixesfreedombox-team/plinth#1290
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Made updating snapshot configuration more efficient by running a single
snapper command instead of one per configuration.
- Set default configuration for NUMBER_LIMIT only once at the time of
installation. Snapshot version has been incremented to support this.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Delete All in case of rollbacks was failing because it cannot delete the
snapshot that's active. This has to be skipped and the remaining snapshots
deleted.
Also, the active snapshot won't be listed in the form to delete all snapshots.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- Make the default snapshot detection slightly more robust and refactor.
- Expand description to explain automatic snapshotting, etc.
- Show description even after setup.
- Show default snapshot as a bootstrap label.
- Message explaing how rollback can be undone.
- Minor updates to delete/rollback confirmation messages.
- Minor style refactoring
- Create and list filesystem snapshots. Hide "current" snapshot.
- Allow deleting snapshots, except for default subvolume.
- Allow rollback to a snapshot.