other versions
- wheezy 2.0.0-1
- wheezy-backports 2.2.0-3~bpo70+1
- jessie 2.3.0+dfsg-3
- testing 2.5.1+dfsg-3
- unstable 2.5.1+dfsg-3
task-sync(5) | User Manuals | task-sync(5) |
NAME¶
task-sync - A tutorial for the task(1) data synchronization capabilities.DESCRIPTION¶
Taskwarrior has built-in support for synchronization, which can be used to keep two task databases up to date, regardless of which one is used. This capability can also be used to keep a backup copy of your task database on another machine.HOW IT WORKS¶
If you were to manually attempt to keep two separate task databases up to date, you would need to inspect both databases, and detect changes that occurred in each one. Those changes would need to be migrated to the other database, while being careful not to miss a change, and not to confuse an 'add' in one with a 'delete' in the other.NEW COMMANDS¶
Taskwarrior has 'pull', 'push' and 'merge' commands which perform the steps necessary to move files around and combine them. In the common use case, you would only need to use the 'merge' command. These commands take an argument that is a URI, which indicates where the remote database resides.MERGE¶
The merge command will fetch task data via URI and combine it with the local task database. The syntax is:task merge [<URI>]
$ task merge ~/work/
PUSH¶
The push command will copy the local task database to the specified URI. The syntax is:task push [<URI>]
PULL¶
The pull command will copy a task database from a URI to the local task database (~/.task by default). The syntax is:task pull [<URI>]
URI TYPES¶
The most basic URI is a path name on the local machine. An example would be:/home/bob/.task/
ssh://[user@]host[:port]/absolute/path/to/.task/
[user@]host:/absolute/path/to/.task/
ssh://[user@]host[:port]/.task/
[user@]host:.task/
[user@]host:.task/
ssh://configured-host/~[username]/.task/
configured-host:~[username]/.task/
http://host[:port]/path/to/.task/
https://host[:port]/path/to/.task/
ftp://[user@]host[:port]/path/to/.task/
$ task push
ftp://´user@name´:host/
CONFLICTS¶
When modifications on the local and remote machine conflict, for example if both machines change the project name of the same task to different values, then Taskwarrior automatically selects the most recent change. Thus, there are no conflicts.EXAMPLE - Backup on another machine¶
One very good use of 'push' is to make backup copies of your task database in another location. Suppose your task database is kept in the usual place, in the ~/.task directory, and you wanted to make a backup copy in ~/backup. You would use this command:$ task push ~/backup/
$ task push user@host:backup
$ task config push.default.uri
user@host:backup
$ task push
$ task pull user@host:backup
$ task config pull.default.uri
user@host:backup
EXAMPLE - Keeping two task databases synchronized¶
The most common synchronization will be to keep two task databases synchronized on different machines. Here is a full example, including setup that illustrates this.local> task add Deliver the new budget
proposal due:tuesday
local> task add Set up a meeting with Bob
remote> task add Present the budget
proposal at the big meeting due:thursday
local> task merge alice@remote:.task
Would you like to push the changes to 'alice@remote:.task'? Y
remote> task 1 due:wednesday
local> task config merge.default.uri
alice@remote:.task
local> task config merge.autopush yes
local> task merge
CONFIGURATION¶
By setting these configuration variables, it is possible to simplify the synchronization commands, by relying on the defaults or alias names.This controls whether the automatic push after
a merge is performed, not performed, or whether the user is asked every time.
The default value is 'ask'.
Sets a default URI so that just the 'task
merge' command be run without the need to retype the URI every time. You can
also use this configuration scheme to set alias names, e.g. set
merge.desktop.uri and run 'task merge desktop'.
Sets a default URI so that just the 'task
push' command be run without the need to retype the URI every time. You can
also use this configuration scheme to set alias names, e.g. set
push.desktop.uri and run 'task push desktop'.
Sets a default URI so that just the 'task
pull' command be run without the need to retype the URI every time. You can
also use this configuration scheme to set alias names, e.g. set
pull.desktop.uri and run 'task pull desktop'.
EXTERNAL DEPENDENCIES¶
Depending on the URI protocols used, the utilities 'scp', 'rsync' and 'curl' must be installed and accessible via the $PATH environment variable.CREDITS & COPYRIGHTS¶
Copyright (C) 2006 - 2013 P. Beckingham, F. Hernandez.SEE ALSO¶
task(1), taskrc(5), task-faq(5), task-color(5), task-tutorial(5), ssh_config(5)- The official site at
- <http://taskwarrior.org>
- The official code repository at
- <git://tasktools.org/task.git/>
- You can contact the project by writing an email to
- <support@taskwarrior.org>
REPORTING BUGS¶
- Bugs in task may be reported to the issue-tracker at
- <http://taskwarrior.org>
2013-04-07 | task 2.2.0 |