You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*[Using resticprofile and systemd](#using-resticprofile-and-systemd)
59
+
*[systemd calendars](#systemd-calendars)
60
+
*[Configuring a systemd profile](#configuring-a-systemd-profile)
61
+
57
62
58
63
## Requirements
59
64
@@ -133,7 +138,7 @@ You can list your profiles:
133
138
$ docker run -it --rm -v $PWD/examples:/resticprofile creativeprojects/resticprofile profiles
134
139
```
135
140
136
-
### Please note:
141
+
### Container host name
137
142
138
143
Each time a container is started, it gets assigned a new random name. You should probably force a hostname to your container...
139
144
@@ -519,10 +524,137 @@ It compares against `(total - used)` which is probably the best way to know how
519
524
520
525
## Scheduled backups
521
526
522
-
I'm working on a feature that is going to manage scheduled backups:
527
+
resticprofile is capable of managing scheduled backups for you:
523
528
- using **systemd** where available (Linux and various unixes)
524
529
- using **launchd** on macOS X
525
-
- using **Task Manager** on Windows
530
+
- using **Task Scheduler** on Windows
531
+
532
+
Each profile can be scheduled independently (not groups yet). Two parameters are added on the profile:
533
+
534
+
```ini
535
+
[profile]
536
+
schedule = "*:00,30"
537
+
schedule-type = "system"
538
+
```
539
+
540
+
### schedule-type
541
+
542
+
`schedule-type` accepts two parameters: `system` or `user`. You can always run the schedule commands for a user schedule, but your backup will be running using your current user permissions on files. That's what you want if you're only saving your documents (or any other file inside your profile).
543
+
544
+
If you need to access some system or protected files, set the `schedule-type` to `system`. You will need to run resticprofile with `sudo` on unixes and with elevated prompt on Windows (please note on Windows resticprofile will ask you for elevated permissions if needed)
545
+
546
+
### schedule
547
+
548
+
The `schedule` parameter accepts many forms of input from the [systemd calendar event](https://www.freedesktop.org/software/systemd/man/systemd.time.html#Calendar%20Events) type. This is by far the easiest to understand. It is the same format used to schedule on macOS and Windows.
549
+
550
+
The most general form is:
551
+
```
552
+
weekdays year-month-day hour:minute:second
553
+
```
554
+
555
+
- use `*` to mean any
556
+
- use `,` to separate multiple entries
557
+
- use `..` for a range
558
+
559
+
**limitations**: divider (`/`), the `~` and timezones are not supported in macOS and Windows.
560
+
561
+
**macOS users**: please note the `year` and `second` fields have no effect on macOS. They don't make much sense anyway.
562
+
563
+
Here are a few examples (taken from the systemd documentation):
0 commit comments