add backup function
This commit is contained in:
parent
3958d4b5b3
commit
7c4f382e19
1 changed files with 4 additions and 0 deletions
|
@ -49,6 +49,10 @@ def delete_server(s):
|
|||
task_stop_game = progress.add_task("[red]Stop Game", total=None)
|
||||
subprocess.check_output("ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null shcloud.eu 'su -c \"cd /gameserver/%s && /gameserver/%s/%s stop\" gameserver'"%(server_game, server_game, server_game), shell=True,stderr=subprocess.STDOUT)
|
||||
progress.update(task_stop_game, completed=1, total=1)
|
||||
# backup game files
|
||||
task_backup = progress.add_task("[red]Backup files", total=None)
|
||||
subprocess.check_output("scp shcloud.eu:/gameserver/home/gameserver/.config/Epic/FactoryGame/Saved/SaveGames/server/* /root/backup/sfserver/", shell=True,stderr=subprocess.STDOUT)
|
||||
progress.update(task_backup, completed=1, total=1)
|
||||
response = s.shutdown()
|
||||
track_progress(response.id, response.command)
|
||||
response = client.volumes.detach(volume)
|
||||
|
|
Loading…
Reference in a new issue