Adds uuid to archive format tags

This commit is contained in:
Michael Herold 2016-06-11 12:03:55 +02:00
parent 34d07d1526
commit 5aa97e283c
3 changed files with 5 additions and 3 deletions

View File

@ -79,7 +79,7 @@ The archive name needs to be unique. It must not end in '.checkpoint' or
checkpoints and treated in special ways.
In the archive name, you may use the following format tags:
{now}, {utcnow}, {fqdn}, {hostname}, {user}, {pid}
{now}, {utcnow}, {fqdn}, {hostname}, {user}, {pid}, {uuid}
To speed up pulling backups over sshfs and similar network file systems which do
not provide correct inode information the --ignore-inode flag can be used. This

View File

@ -1362,7 +1362,7 @@ class Archiver:
checkpoints and treated in special ways.
In the archive name, you may use the following format tags:
{now}, {utcnow}, {fqdn}, {hostname}, {user}, {pid}
{now}, {utcnow}, {fqdn}, {hostname}, {user}, {pid}, {uuid}
To speed up pulling backups over sshfs and similar network file systems which do
not provide correct inode information the --ignore-inode flag can be used. This

View File

@ -13,6 +13,7 @@ import stat
import textwrap
import time
import unicodedata
import uuid
from binascii import hexlify
from collections import namedtuple, deque
from datetime import datetime, timezone, timedelta
@ -740,7 +741,8 @@ class Location:
'hostname': socket.gethostname(),
'now': current_time.now(),
'utcnow': current_time.utcnow(),
'user': uid2user(os.getuid(), os.getuid())
'user': uid2user(os.getuid(), os.getuid()),
'uuid': str(uuid.uuid4())
}
return format_line(text, data)