Features
ChronShield and Timeshift are system restore utilities for Linux that create a snapshot of system files. ChronShield creates system snapshots using BorgBackup. Timeshift creates system snapshots using Rsync and BTRFS snapshots.
The following is a summary of features in ChronShield and a comparison of differences with Rsync and BTRFS snapshots created by Timeshift.
1. Compression
Snapshots are compressed using LZ4 or ZStd compression. Even at the fastest settings (using LZ4) it can reduce disk usage by 60%.
Both LZ4 and ZSTD:1 compression are almost as fast as dealing with uncompressed data. The impact on CPU usage is negligible even if you have an older computer with a weaker CPU.
If you have modern CPU, you can use ZSTD levels 3 to 9 to save even more disk space. Levels above 9 are not recommended as they are significantly slower without a comparable increase in compression ratio.
Timeshift Rsync - Files are stored without compression and require a lot of disk space.
Timeshift BTRFS - BTRFS supports compression at the filesystem level. Files in a snapshot have the same compression as the original file.
2. Deduplication
Files are de-duplicated by splitting data into blocks. Only new blocks are added to the repository when a snapshot is created.
De-duplication works both between snapshots (same file in multiple snapshots) and within the same snapshot (similar files in same snapshot).
Timeshift Rsync - No de-duplication. A copy of entire file is stored again if there is any change in file data or metadata such permissions, timestamps, etc.
Timeshift BTRFS - BTRFS snapshots are ref-linked with the original subvolume which results in de-duplication of files between snapshots. Similar files within the same snapshot are not de-duplicated. De-duplication can be done manually by running special tools such as BEES and duperemove.
3. Disk space
Thanks to de-duplication. Borg stores file changes more efficiently. If a 1 GB file has changed by 1 MB, creating a new snapshot will use only 1 MB of additional space.
Timeshift Rsync - If a 1 GB file has changed by 1 MB, creating a new snapshot creates another copy of the file which requires 1 GB of additional space. Even though files are hard-linked between snapshots to save disk space, directories cannot be hard-linked in the same way. Each snapshot has to duplicate the entire directory structure which requires ~200 MB of additional disk space.
Timeshift BTRFS - Creating a new snapshot does not require additional disk space since files in snapshot are ref-linked with original files in the system.
4. Encryption
Snapshots are strongly encrypted with 256-bit AES encryption. The default password is ‘system’ and can be changed by the user to protect the data. Leave the password at the default value if you don’t care about setting up a password.
Caution
Do not change the default password unless you really need password protection. Since the password will be required again only at the time of restoring the system, it is likely that you may forget the new password by the time you need to do a restore.
Timeshift Rsync - Files are stored without encryption and can be accessed by anyone with root permission.
Timeshift BTRFS - Files are stored without encryption and can be accessed by anyone with root permission.
5. Integrity
Checksums are calculated and stored for data blocks stored in the repository. Any damage or modification to snapshot data can be easily detected.
Timeshift Rsync - Files and directories are stored without additional checksums. Files can be modified by anyone with root permission.
Timeshift BTRFS - Files and directories are stored without additional checksums. Files can be modified by anyone with root permission.
6. Filesystem Support for Snapshot location
Snapshots can be saved to any location on any filesystem.
By default, snapshots are saved to /chronshield
on the root device.
Timeshift Rsync - Snapshots must be saved on a Linux filesystem that supports hard-links such EXT4, BTRFS, etc. Windows filesystems like NTFS, FAT32, exFAT, etc are not supported.
Timeshift BTRFS - Snapshots are saved on the same BTRFS filesystem.
7. Filesystem Support for System disk
Common Linux filesystems like EXT4, BTRFS, XFS, etc are supported. ZFS is not supported.
Timeshift Rsync - System disk must be formatted with a Linux filesystems like EXT4, BTRFS, XFS, etc. ZFS is not supported.
Timeshift BTRFS - System disk must be formatted with BTRFS with @ and @home subvolumes.
8. Moving Snapshots
Snapshots can be easily copied or moved to another location by copying the folder that contains the snapshots using a file manager.
Timeshift Rsync - Snapshots are difficult to copy or move due
to the presence of hard-linked files between snapshots.
Snapshots must be copied or movied carefully by running rsync
from the command-line, without breaking the hard-links between files.
Timeshift BTRFS - Snapshots are difficult to move and
require special commands such as btrfs send
and btrfs receive
.
9. File Format
Snapshots are stored in the Borg repository format and must be mounted as a FUSE filesystem to access the files and directories inside.
You can mount any snapshot in the snapshot list with a double-click, or by using the ‘Mount’ button.
Once the snapshot is mounted, it can be browsed with a file manager. The profile will remain locked while mounted, and any scheduled snapshots will fail.
Close any applications that are using the mount path and unmount the snapshot when you finish.
Timeshift Rsync - Files and directories in snapshots can be browsed with a file manager without any extra steps
Timeshift BTRFS - Files and directories in snapshots can be browsed with a file manager without any extra steps
10. Online Snapshots
Snapshots can be created while the system is running (online).
Timeshift Rsync - Snapshots can be created while the system is running (online).
Timeshift BTRFS - Snapshots can be created while the system is running (online). Snapshots are atomic and captures the current state of all files at the instant that the snapshot is created.
11. Online Restore
System cannot be restored while it is running (online) since running processes can overwrite restored files. Restore must be done offline by booting from a Live-USB.
Timeshift Rsync - System can be restored while it is running (online) but has a risk of failure since running processes can overwrite the restored files. Offline restore is recommended by booting from a Live-USB.
Timeshift BTRFS - System can be restored while it is running without any risk. The restored subvolume becomes active only after the next reboot. Offline restore can also be done by booting from a Live-USB.
12. Free space management
Disk space required for a new snapshot can be estimated quickly due to the cache that BorgBackup maintains.
Timeshift Rsync - Disk space required for a new snapshot is difficult to estimate. Estimation requires almost as much time as creating the snapshot.
Timeshift BTRFS - Creating a new snapshot does not require any disk space. However, disk space usage will increase over time when system files change, and files diverge from the original snapshot.
13. Bootloader Handling
ChronShield works with most bootloaders and does not install, reinstall or make changes to bootloader configuration. Files on boot partition and ESP will be restored from snapshot.
On Fedora the GRUB configuration will be changed temporarily to complete the restore.
Timeshift Rsync - Can reinstall GRUB2 bootloader. Other bootloaders are not supported.
Timeshift BTRFS - Can reinstall GRUB2 bootloader. Other bootloaders are not supported.
14. Inode Usage
Each snapshot appends data to existing files in data repository and creates only a few files.
Timeshift Rsync - Each snapshot duplicates the root directory structure, creating 50K directories and 300K hard-links on an average system. Repeated creation and deletion of hourly snapshots can use up inodes and fragment the filesystem metadata.
Timeshift BTRFS - Each snapshot or subvolume is an independant filesystem tree with its own inode namespace.
15. User Configs in Home
Configuration files in the user’s home directory are always included in snapshots,
and can be replaced on restore.
This includes all files and directories that start with a dot character
(like .bashrc
and .config
).
Other files and directories (not starting with a dot) are excluded.
During restore, you will get an option for restoring configuration files in user directories. This option is selected by default and it is recommended to keep this selected.
Timeshift Rsync - Config files in user’s home directory can be included in snapshots (optional), and replaced on restore (optional).
Timeshift BTRFS - Entire home subvolume (@home) can be restored or excluded. It is not possible to restore or exclude only config files.
16. Scheduling
Scheduled snapshots are created at hourly intervals by default. Intervals of 1/2/4/6/8/12 hours can be selected from the Settings window.
Scheduling is implemented using a SystemD service and timer.
On systems that don’t use SystemD (like AntiX and Devuan) the cron
scheduler will be used as fallback.
Timeshift Rsync - Scheduled snapshots are created at hourly intervals if enabled.
Timeshift BTRFS - Scheduled snapshots are created at hourly intervals if enabled.
17. Speed
Creation of snapshot is very quick (less than a minute) due to the cache that BorgBackup maintains.
Timeshift Rsync - Creation of snapshot is quick but can take some time since files and directories need to be compared.
Timeshift BTRFS - Creation of snapshot takes less than a second since only subvolume metadata is duplicated. It does not require files to be compared or copied.
18. Excluded Items
Temporary directories, cache directories, external filesystems, and dynamically-populated system directories are excluded from snapshots.
You can exclude additional files and directories by adding then to the exclude list in the Settings window.
Caution
Please be careful when adding items to this list. Adding any important files and directories to this list will break your system after restore. Keep this list empty for best results.
Caution
Do not add patterns to this list. Each item must be a valid path to a file or directory on the system. This will be converted into suitable patterns for BorgBackup and Rsync when creating or restoring snapshots.
Timeshift Rsync - Temporary directories, cache directories, and dynamically-populated system directories are excluded from snapshots. External filesystems must be excluded manually by user if mounted in non-standard locations (outside of /media, /run, etc)
Timeshift BTRFS - Snapshot is created for the entire subvolume. External filesystems and nested subvolumes are excluded automatically.
19. Flatpak Packages
Data and settings for packages are included in snapshots and will be replaced on restore. Installed files are excluded to save disk space.
Timeshift Rsync - Installed files, data, and settings can be included in snapshots and replaced on restore (optional).
Timeshift BTRFS - Installed files, data, and settings are included in snapshots.
20. Snap Packages
Data and settings for packages are included in snapshots and will be replaced on restore. Installed files are excluded to save disk space.
Timeshift Rsync - Installed files are excluded from snapshots to save disk space. Data and settings can be included in snapshots and replaced on restore (optional).
Timeshift BTRFS - Snap packages, data and settings are included in snapshots.
21. Virt-Manager, VirtualBox, Docker
Data and settings are excluded from snapshots to save disk space.
Timeshift Rsync - Data and settings are excluded from snapshots to save disk space.
Timeshift BTRFS - Data and settings are included in snapshots.
22. Fedora Support
Fedora and SELinux is supported (for GRUB bootloader only).
Timeshift Rsync - Not designed for Fedora. Restored system can fail to boot due to SELinux restrictions.
Timeshift BTRFS - Not designed for Fedora. Restored system can fail to boot due to SELinux restrictions.
23. Hardware failure, filesystem errors, disk reformatting
System disk must be healthy for restore to succeed. Restore will not work if the system disk is damaged or reformatted.
Timeshift Rsync - System disk must be healthy for restore to succeed. Restore will not work if the system disk is damaged or reformatted. There is an option to remap the target devices to new devices, but this has a chance of failure. Remapping to new devices will not work if system disk uses LVM or LUKS.
Timeshift BTRFS - System disk must be healthy for restore to succeed. Restore will not work if the system disk is damaged or reformatted.
24. SecureBoot
SecureBoot is not supported.
Timeshift Rsync - SecureBoot is not supported.
Timeshift BTRFS - SecureBoot is not supported.
Note
This is a comparison of how system snapshots work as implemented by ChronShield and Timeshift. This is not meant to be a comparison of Rsync and BorgBackup. RSync is a file transfer tool while BorgBackup is a file backup tool. Both tools are very versatile and have their own advantages and disadvantages.
Note
Excluded items remain unchanged after restoring a snapshot. This is both a pro and a con. Restoring a snapshot will keep the current state of excluded items (pro), but this means that you won’t be able to rollback any undesired changes (con).