mirror of
https://github.com/partitioncloud/partitioncloud-server.git
synced 2025-01-23 09:16:25 +01:00
migration: Add --backup flag
This commit is contained in:
parent
1bd70c8653
commit
52894d37ea
@ -201,11 +201,18 @@ if __name__ == "__main__":
|
||||
"--restore",
|
||||
help="restore from specific version backup, will not apply any hook (vx.y.z)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-b",
|
||||
"--backup",
|
||||
help="backup current version, without running any hooks",
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
config.instance = os.path.abspath(args.instance)
|
||||
|
||||
if args.restore is None:
|
||||
migrate(args.current, args.target, skip_backup=args.skip_backup)
|
||||
else:
|
||||
if args.restore is not None:
|
||||
restore(args.restore)
|
||||
elif args.backup is not None:
|
||||
backup_instance(args.backup, verbose=True)
|
||||
else:
|
||||
migrate(args.current, args.target, skip_backup=args.skip_backup)
|
||||
|
Loading…
Reference in New Issue
Block a user