mirror of
https://github.com/ZettaIO/restic-compose-backup.git
synced 2025-10-10 04:10:57 +00:00
14 lines
358 B
Python
14 lines
358 B
Python
from .base import BaseCommand
|
|
from restic_compose_backup import restic
|
|
|
|
|
|
class Command(BaseCommand):
|
|
"""List snapshots"""
|
|
name = "snapshots"
|
|
|
|
def run(self):
|
|
"""Display restic snapshots"""
|
|
stdout, stderr = restic.snapshots(self.config.repository, last=True)
|
|
for line in stdout.decode().split('\n'):
|
|
print(line)
|