diff --git a/examples/config-templates/config-all.toml b/examples/config-templates/config-all.toml index 45599e6..3db87b6 100644 --- a/examples/config-templates/config-all.toml +++ b/examples/config-templates/config-all.toml @@ -2,16 +2,16 @@ # These are all the current available options # Snapshots directory -dest_dir = "/.rusnapshot" +dest_dir = "/.snapshots" # Directory to be snapshot-ed source_dir = "/" # SQLite database file PATH where snapshots metadata will be stored. Created if not exists -database_file = "/.rusnapshot/rusnapshot.db" +database_file = "/.snapshots/rusnapshot.db" # Prefix for the snapshots, they will be saved in the format prefix-$current_date snapshot_prefix = "root" # Snapshots identifier snapshot_kind = "weekly" # Last snapshots to keep. If prefix is specified then only the snapshots with that prefix will be deleted -keep_only = 2 +keep_only = 3 # Machine name to be used in the snapshots metadata machine = "Oribos" diff --git a/examples/config-templates/config-home.toml b/examples/config-templates/config-home.toml index 716b6f0..ea9b505 100644 --- a/examples/config-templates/config-home.toml +++ b/examples/config-templates/config-home.toml @@ -1,12 +1,12 @@ # Snapshots directory -dest_dir = "/.rusnapshot" +dest_dir = "/.snapshots" # Directory to be snapshot-ed source_dir = "/home" # SQLite database file PATH where snapshots metadata will be stored. Created if not exists -database_file = "/.rusnapshot/rusnapshot.db" +database_file = "/.snapshots/rusnapshot.db" # Prefix for the snapshots, they will be saved in the format prefix-$current_date snapshot_prefix = "home" # Last snapshots to keep. If prefix is specified then only the snapshots with that prefix will be deleted -keep_only = 2 +keep_only = 3 # Machine name to be used in the snapshots metadata -machine = "Oribos" \ No newline at end of file +machine = "Oribos" diff --git a/examples/config-templates/config-root.toml b/examples/config-templates/config-root.toml index 95e4717..4443ff7 100644 --- a/examples/config-templates/config-root.toml +++ b/examples/config-templates/config-root.toml @@ -1,12 +1,12 @@ # Snapshots directory -dest_dir = "/.rusnapshot" +dest_dir = "/.snapshots" # Directory to be snapshot-ed source_dir = "/" # SQLite database file PATH where snapshots metadata will be stored. Created if not exists -database_file = "/.rusnapshot/rusnapshot.db" +database_file = "/.snapshots/rusnapshot.db" # Prefix for the snapshots, they will be saved in the format prefix-$current_date snapshot_prefix = "root" # Last snapshots to keep. If prefix is specified then only the snapshots with that prefix will be deleted -keep_only = 2 +keep_only = 3 # Machine name to be used in the snapshots metadata -machine = "Oribos" \ No newline at end of file +machine = "Oribos" diff --git a/examples/services/rusnapshot-three-hours.service b/examples/services/rusnapshot-daily.service similarity index 64% rename from examples/services/rusnapshot-three-hours.service rename to examples/services/rusnapshot-daily.service index b1f5a73..f077e1c 100644 --- a/examples/services/rusnapshot-three-hours.service +++ b/examples/services/rusnapshot-daily.service @@ -3,10 +3,7 @@ Description=Snapshot root directory. [Service] Type=oneshot -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind three-hours -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind three-hours --rw -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind three-hours -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind three-hours --rw - -[Install] -WantedBy=default.target \ No newline at end of file +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --create --kind daily +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --clean --kind daily +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --create --kind daily +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --clean --kind daily diff --git a/examples/services/rusnapshot-daily.timer b/examples/services/rusnapshot-daily.timer new file mode 100644 index 0000000..81f1abd --- /dev/null +++ b/examples/services/rusnapshot-daily.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Take snapshots daily. + +[Timer] +OnCalendar=daily +Persistent=true + +[Install] +WantedBy=timers.target \ No newline at end of file diff --git a/examples/services/rusnapshot-monthly.service b/examples/services/rusnapshot-monthly.service index ac9eefd..71ce7c8 100644 --- a/examples/services/rusnapshot-monthly.service +++ b/examples/services/rusnapshot-monthly.service @@ -3,10 +3,10 @@ Description=Take system snapshots monthly. [Service] Type=oneshot -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind monthly -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind monthly --rw -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind monthly -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind monthly --rw +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --create --kind monthly +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --clean --kind monthly +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --create --kind monthly +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --clean --kind monthly [Install] WantedBy=default.target \ No newline at end of file diff --git a/examples/services/rusnapshot-three-hours.timer b/examples/services/rusnapshot-three-hours.timer deleted file mode 100644 index 54ef618..0000000 --- a/examples/services/rusnapshot-three-hours.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Take snapshots every 3 hours. - -[Timer] -OnBootSec=1h -OnUnitActiveSec=3h - -[Install] -WantedBy=timers.target \ No newline at end of file diff --git a/examples/services/rusnapshot-weekly.service b/examples/services/rusnapshot-weekly.service index 25ad102..155ba82 100644 --- a/examples/services/rusnapshot-weekly.service +++ b/examples/services/rusnapshot-weekly.service @@ -3,10 +3,10 @@ Description=Take system snapshots weekly. [Service] Type=oneshot -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind weekly -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --cr --clean --kind weekly --rw -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind weekly -ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --cr --clean --kind weekly --rw +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --create --kind weekly +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-root.toml --clean --kind weekly +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --create --kind weekly +ExecStart=/usr/bin/rusnapshot -c /etc/rusnapshot/config-home.toml --clean --kind weekly [Install] WantedBy=default.target \ No newline at end of file