| TTD(8) | System Manager's Manual | TTD(8) |
NAME
ttd — byol's time
travel
SYNOPSIS
ttd |
DESCRIPTION
ttd takes the points of a byol's root and
its copies to a place, as the appliance's root monitor does for a world's
home. It runs as root, a runit service, on a root that is the store's image,
/swmdata/images/root.img; on another root the
service goes down.
A point is a reflink clone of the root's image, in
/swmdata/images/tt/, taken while the root is frozen,
each hour the root changed. ttd keeps every point of
the last day, one a day for the week before, then one a week for 104 weeks.
It takes no point while the store has less than 5% free. Under 1% free, it
stops a running copy, deletes root.prev.img, and
then, while the store is still under 1% free, deletes every point. Each hour
it gives the store back what it freed. Time travel starts off.
ttd answers swmtool
tt on its socket: status, on and off, take, delete, mount and umount,
back, and place. It takes a command only from a root client. The command
must come whole in 2 seconds. Its memory is locked: it lives on the root
that it freezes.
One writer at a time: ttd holds
/run/tt.lock while it runs, and does not start while
a tt(8) holds it.
tt(8) refuses while
ttd runs.
The place is a directory that the user mounted: XFS, ext4, btrfs,
FAT or exFAT on a disk, an NFS export, or an SMB share. FUSE is refused.
Each copy runs on the box, in a root child process that mounts its own copy
of the directory nosuid, nodev and noexec. When the directory is not
mounted, the place is absent: ttd makes no copy and
says so; its points go on. A place that
tt(8) refuses, ttd refuses too.
ttd forks the child at each job, so the child holds
what ttd holds then.
FILES
- /run/tt.lock
- the one writer's lock
- /run/ttd.sock
- the socket
swmtool ttasks - /swmdata/images/root.img
- the root's image
- /swmdata/images/root.next.img
- a rollback the next boot takes
- /swmdata/images/root.prev.img
- the root before the last rollback
- /swmdata/images/tt/
- the points and the record
- /points/hour
- a point mounted read-only
- /var/log/ttd/
- the log
SIGNALS
SIGINT,SIGTERM- Start no new point or copy. Give a running job 10 seconds to end, stop it, then exit.
EXIT STATUS
ttd exits 0 on
SIGINT or SIGTERM. It exits
1 when it is not root, when a tt(8) holds
/run/tt.lock, when the root is not a store's image,
or when it cannot make its socket. It exits 2 on an argument.
SEE ALSO
AUTHORS
Marco Peereboom <marco@peereboom.us>
| November 20, 2026 | Void Linux |