mirror of https://github.com/restic/restic.git
Compare commits
10 Commits
56510b8717
...
0bfe65af0d
Author | SHA1 | Date |
---|---|---|
Richard Anthony | 0bfe65af0d | |
Michael Eischer | 24c1822220 | |
flow-c | d4477a5a99 | |
Richard Anthony | ac10f62295 | |
Richard Anthony | ad1f844cea | |
Richard Anthony | bd25620880 | |
Richard Anthony | 1b4d6e2777 | |
Richard Anthony | 619e243e60 | |
Richard Anthony | 73c7780a03 | |
Richard Anthony | 7ca98f6cd8 |
|
@ -0,0 +1,32 @@
|
|||
package restic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/restic/restic/internal/restic"
|
||||
)
|
||||
|
||||
type Snapshot struct {
|
||||
paths, tags []string
|
||||
hostname string
|
||||
time time.Time
|
||||
}
|
||||
|
||||
type Filter struct {
|
||||
ctx context.Context
|
||||
be restic.Lister
|
||||
loader restic.LoaderUnpacked
|
||||
hosts, snapshotIDs []string
|
||||
tags restic.TagList
|
||||
paths []restic.TagList
|
||||
cb restic.SnapshotFindCb
|
||||
}
|
||||
|
||||
func New(s *Snapshot) (*restic.Snapshot, error) {
|
||||
return restic.NewSnapshot(s.paths, s.tags, s.hostname, s.time)
|
||||
}
|
||||
|
||||
func Find(f *Filter) {
|
||||
restic.FindFilteredSnapshots(f.ctx, f.be, f.loader, f.hosts, f.paths, f.tags, f.snapshotIDs, f.cb)
|
||||
}
|
|
@ -205,7 +205,7 @@ The ``forget`` command accepts the following policy options:
|
|||
natural time boundaries and *not* relative to when you run ``forget``. Weeks
|
||||
are Monday 00:00 to Sunday 23:59, days 00:00 to 23:59, hours :00 to :59, etc.
|
||||
They also only count hours/days/weeks/etc which have one or more snapshots.
|
||||
A value of ``-1`` will be interpreted as "forever", i.e. "keep all".
|
||||
A value of ``unlimited`` will be interpreted as "forever", i.e. "keep all".
|
||||
|
||||
.. note:: All duration related options (``--keep-{within-,}*``) ignore snapshots
|
||||
with a timestamp in the future (relative to when the ``forget`` command is
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
//go:build js
|
||||
// +build js
|
||||
|
||||
package fs
|
||||
|
||||
// Flags to OpenFile wrapping those of the underlying system. Not all flags may
|
||||
// be implemented on a given system.
|
||||
const (
|
||||
O_RDONLY int = 0
|
||||
O_WRONLY int = 0
|
||||
O_RDWR int = 0
|
||||
O_APPEND int = 0
|
||||
O_CREATE int = 0
|
||||
O_EXCL int = 0
|
||||
O_SYNC int = 0
|
||||
O_TRUNC int = 0
|
||||
O_NONBLOCK int = 0
|
||||
O_NOFOLLOW int = 0
|
||||
)
|
|
@ -0,0 +1,15 @@
|
|||
//go:build js
|
||||
// +build js
|
||||
|
||||
package fs
|
||||
|
||||
import (
|
||||
"os"
|
||||
// "syscall"
|
||||
// "time"
|
||||
)
|
||||
|
||||
// extendedStat extracts info into an ExtendedFileInfo for unix based operating systems.
|
||||
func extendedStat(fi os.FileInfo) ExtendedFileInfo {
|
||||
return ExtendedFileInfo{}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package signals
|
||||
|
||||
func setupSignals() {}
|
Loading…
Reference in New Issue