LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

timeshift

System backup and restore using snapshots

TLDR

List all snapshots
$ sudo timeshift --list
copy
Create a snapshot with a description
$ sudo timeshift --create --comments "[description]"
copy
Create a snapshot with a specific tag
$ sudo timeshift --create --tags D
copy
Check and create a snapshot if scheduled
$ sudo timeshift --check
copy
Restore a specific snapshot
$ sudo timeshift --restore --snapshot '[snapshot_name]'
copy
Restore a snapshot to a specific target device
$ sudo timeshift --restore --snapshot '[snapshot_name]' --target-device [/dev/sda1]
copy
Delete a specific snapshot
$ sudo timeshift --delete --snapshot '[snapshot_name]'
copy
Delete all snapshots
$ sudo timeshift --delete-all
copy

SYNOPSIS

timeshift [OPTIONS]

DESCRIPTION

timeshift is a system restore utility for Linux that creates incremental snapshots of the filesystem using rsync or btrfs snapshots. It allows rolling back system changes while preserving user data.Similar to Windows System Restore or macOS Time Machine for system files.

PARAMETERS

--list

List all snapshots.
--list-devices
List available devices.
--check
Create snapshot if one is scheduled.
--create
Create a new snapshot (even if not scheduled).
--restore
Restore a snapshot.
--delete
Delete a snapshot.
--delete-all
Delete all snapshots.
--snapshot NAME
Specify the snapshot to restore or delete.
--comments TEXT
Set snapshot description.
--tags {O,B,H,D,W,M}
Add tags to snapshot: Ondemand, Boot, Hourly, Daily, Weekly, Monthly (default: O).
--target-device DEVICE
Specify target device for restore.
--grub-device DEVICE
Specify device for installing GRUB2 bootloader.
--skip-grub
Skip GRUB2 reinstallation during restore.
--snapshot-device DEVICE
Specify backup device (default: from config).
--btrfs
Switch to BTRFS mode.
--rsync
Switch to RSYNC mode.
--yes
Answer YES to all confirmation prompts.
--scripted
Run in non-interactive mode.

CAVEATS

Requires sufficient storage space. BTRFS snapshots are more space-efficient than rsync. User data in /home is excluded by default for safety. Restoring typically requires a reboot. Requires root privileges for all operations.

HISTORY

Timeshift was created by Tony George as a GUI and CLI tool for system backup on Linux, originally released in 2014.

SEE ALSO

rsync(1), btrfs(8), snapper(1), btrbk(1), restic(1)

Copied to clipboard
Kai