Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Creates incremental backups, and thins them out the older they get. By default, it will keep all backups you make for 48 hours, then keep daily backups for 14 days, and after that, keep all weekly backups. Each backup is a complete, self-contained clone of the original directories. To save space, unchanged files are hard-linked to the previous backup.

Create your first backup using

./ -l /path/to/ /save/backups/here/ /back/this/up/ /and/this/too/

Then run the same script hourly with cron or systemd or launchd, and it will create directories like this:





After 48 hours, it will start deleting older backups so that only one backup per day remains. After another 14 days, it will delete some of those, so that only one backup per week remains.


You can customize the number of hours where all backups are kept using the --hours switch, the number of days for daily backups with --days, the number of weeks for weekly backups with --weeks. If any of these is set to -1, it will keep all of them. By default, all weekly backups are kept.

You need to specify a lock file with -l to ensure that only one instance of timeup is running at any one time. You can store this file anywhere you want, as long as you have write access to that location. If no lock file is given, timeup will not lock, which might lead to errors if more than one instance is running at the same time.

If you want to change the directory names, you can use --format, and supply any strftime-compatible format string. This is particularly necessary on file systems that don't support : in file names.


systemd (Linux)

create two files in /etc/systemd/system/:


Description=Run hourly backup




Description=Run hourly backup

ExecStart=/path/to/ -l /path/to/ /save/backups/here/ /back/this/up/ /and/this/too/

Since the first backup will take some time, let's run it manually first:

systemctl start timeup.service

Then enable the timer with

systemctl enable timeup.timer

launchd (macOS)

On macOS, there are a few issues:

  • macOS ships only Python 2.7, which lacks a required library
  • The file system does not support : in file names

Thus, we need to install the missing library:

sudo /usr/bin/easy_install pathlib

And write a configuration file in ~/Library/LaunchAgents/ that changes the naming pattern:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Then load the agent file:

launchctl load ~/Library/LaunchAgents/timeup.plist

And start the service once:

launchctl start timeup

If backups are not being created, check in if there is an error, or add


to the configuration file.


  • Does timeup work on Windows?
    Apparently, there are Windows versions of rsync available, most notably in msys2, cygwin, and WSL. I know that at least os.kill(pid, 0) does not work on Windows, though. This part could simply be disabled without much trouble. Pull Requests are welcome.

  • Does timeup work with Python 2?
    It seems to work on my Mac, but I haven't tested it thoroughly.


Create Backups much like Time Machine, using rsync.






No releases published


No packages published