Skip to content

--timestamp-aware {now}/{utcnow} placeholders #5189

@martinvonwittich

Description

@martinvonwittich

Have you checked borgbackup docs, FAQ, and open Github issues?

Yes

Is this a BUG / ISSUE report or a QUESTION?

Feature request

System information. For client/server mode post info for both machines.

Your borg version (borg -V).

martin@martin ~ % borg -V
borg 1.1.5

Operating system (distribution) and version.

martin@martin ~ % lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:        18.04
Codename:       bionic

Hardware / network configuration, and filesystems used.

shouldn't matter

How much data is handled by borg?

shouldn't matter

Full borg commandline that lead to the problem (leave away excludes and passwords)

borg create -s --timestamp /path/to/old/backup -C auto,zstd --exclude-caches ./::"{hostname}-{now:%Y-%m-%dT%H:%M:%S.%f}" /path/to/old/backup

Describe the problem you're observing.

{now}/{utcnow} currently refer to the current date and time. This is fine when creating normal backups, but it's not really useful when using the --timestamp option to manually set the archive creation date, e.g. when importing old backups:

--timestamp TIMESTAMP
       manually specify the archive creation date/time
       (UTC, yyyy-mm-ddThh:mm:ss format).
       Alternatively, give a reference file/directory.

For --timestamp, it would be useful if {now}/{utcnow} would either refer to the timestamp as specified by --timestamp, or if new placeholders like {timestamp} and {utctimestamp} were introduced. The new placeholders could then refer the the current time if --timestamp wasn't used, and to the referred timestamp otherwise.

Bounty: https://www.bountysource.com/issues/91451358-timestamp-aware-now-utcnow-placeholders

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions