Skip to content

Add missing placeholder keys#2227

Merged
m3nu merged 4 commits intoborgbase:masterfrom
VandalByte:dev-placeholder-keys
Apr 13, 2025
Merged

Add missing placeholder keys#2227
m3nu merged 4 commits intoborgbase:masterfrom
VandalByte:dev-placeholder-keys

Conversation

@VandalByte
Copy link
Collaborator

@VandalByte VandalByte commented Apr 12, 2025

Description

This PR adds the missing placeholder keys available in borg into vorta.

While I was working on it I noticed dt.utcnow() was deprecated, so I replaced it with the new preferred method.

Output of dt.utcnow() [DEPRECATED]

2025-04-12 18:25:42.922358

Output of dt.now(timezone.utc) [NEW]

2025-04-12 18:25:42.922358+00:00

Which according to google is a full ISO 8601 timestamp, and according to borg docs, borg accepts the ISO 8601 format.

Related Issue

Closes #1954

Motivation and Context

Vorta currently raises an "Error in archive name template" when users include valid Borg placeholders such as {utcnow}, {pid}, {borgversion} etc. in the archive name. These placeholders are documented in borg should be supported. Adding support for those placeholders should address the error.

How Has This Been Tested?

Tested it by running the application build.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read the CONTRIBUTING guide.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.

@VandalByte
Copy link
Collaborator Author

Had a small import error, but it's been fixed.

@m3nu m3nu merged commit 39c1c7f into borgbase:master Apr 13, 2025
7 checks passed
@m3nu
Copy link
Contributor

m3nu commented Apr 13, 2025

Thanks! Looks like a reasonable change.

@VandalByte VandalByte deleted the dev-placeholder-keys branch April 14, 2025 04:35
@VandalByte VandalByte mentioned this pull request Apr 27, 2025
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to use some placeholders in archive names

2 participants