mirror of
https://github.com/dragonlock2/matthewtran.com.git
synced 2025-10-11 12:07:56 +00:00
24 lines
536 B
Python
Executable File
24 lines
536 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import shutil
|
|
import subprocess
|
|
|
|
if __name__ == "__main__":
|
|
out = "data.zip"
|
|
subprocess.run(["zip", "-FS", "-r", out,
|
|
"minecraft/worlds",
|
|
"minecraft_bedrock/worlds",
|
|
"terraria/worlds",
|
|
"terraria/mods",
|
|
"website/gitea",
|
|
], check=True)
|
|
shutil.chown(out, os.getlogin(), os.getlogin())
|
|
|
|
# TODO backup and scp
|
|
# TODO restore
|
|
# fix permissions
|
|
# no wipe folders we didn't save
|
|
# may need to chown 777 for gitea
|
|
# TODO router wipe + peer.py
|