Scroll to navigation

sy-cleanup(1) General Commands Manual sy-cleanup(1)


sy-cleanup - remove old versions and free remote disk space


sy cleanup [-o | --delete-older-than=<relative-time>] [-f | --force]
[-I | --no-delete-interval] [-O | --no-delete-older-than]
[-T | --no-temp-removal] [<status-options>]


This command performs different operations to cleanup the local database as well as the remote store. It removes old versions from the local database, deletes unused multichunks (if possible) and merges remote database files, if necessary.

Remove old file versions: File versions are deleted by two criteria. The first is if it is older than 30 days (configurable with -o, disable with -O). The second is an interval based strategy, to keep the version history readable. By default, one version is kept per minute in the last hour, one verison is kept per hour in the last three days and one version per day is kept in the last month. This strategy can be disabled with -I.

Merge remote databases: The remote databases of the local client are merged together if there are more than 15 remote databases per client. The purpose of this is to avoid endless amounts of small database files on the remote storage and a quicker download process for new clients. In addition, databases are merged whenever versions are removed.

This command uses the ´status´ and ´ls-remote´ commands and is only executed if there are neither local nor remote changes.


-o, --delete-older-than=<relative-time>

Sets the time that cleanup waits before deleting all versions that are older than this time. Until this time, deleted files can still be restored. Cleanup will fully delete files that were deleted longer ago in the past than this amount of time and they will be gone permanently. In addition, any versions of files which are not the current version, and older than this threshold will also be deleted. Default is 30 days (30d).

Relative time format: <value><unit>, for which <value> may be any floating point number and <unit> may be any of the following: s(econds), m(inutes), h(ours), d(ays), w(eeks), mo(nths), y(ears). Units may be shortened if they are unique. Examples: 5h30m or 1y1mo2d

-I, --no-delete-interval

Turns off the version removal strategy based on intervals. By default the following policy is applied: For the last hour, the last version from each minute is kept. For the last three days, the last version from each hour is kept. For the last thirty days, the last version from each day is kept.

With this option, only old file versions (-o) will be deleted.

-O, --no-delete-older-than

Turns off the removal of old versions for the command. If this is set, this command will not delete file versions purely because they are old.

-T, --no-temp-removal

Turns off the removal of leftover temporary files for the command. If this is set, this command will leave temporary files on the offsite storage untouched.

-f, --force

Forces a the cleanup, even if the time between cleanups (3 hours) has not passed. Use this option only if a cleanup is absolutely necessary and you know what you are doing.


Syncany 0.4.9-alpha, Distributed under GPLv3, Copyright (c) 2011-2015 Philipp C. Heckel