my-ostree-OS/usr/bin/snapshot-home.py
2023-11-09 22:45:38 +01:00

8 lines
226 B
Python
Executable file

#!/usr/bin/python3 -u
import os
import datetime
stream = os.popen('btrfs subvolume snapshot /var/home /var/.snapshot.home/' + datetime.datetime.now().strftime("%Y.%m.%d_%H:%M:%S") + '/')
output = stream.read()
print(output)