my-ostree-OS/usr/bin/snapshot-home.py

8 lines
226 B
Python
Raw Normal View History

#!/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)