I believe it requires the Unix timestamp as a long int, but represented
as a string, so you would need to first convert your string to the Unix
long int representation.
The example command below is untested, but this should work to set the
backup_timestamp to the time value of some archive file taken from some
other non-qubes backup solution.
$ backup_timestamp=`date --reference=/path/to/my_backup.tgz +%s`
$ qvm-prefs --set $vm backup_timestamp $backup_timestamp
Or like you asked, you can just use the date command to convert any
standard time format string to the required unix timestamp value. If you
are using the qvm-backuprestore command like I am, then this is always
done for you for free, and you need not worry about managing the backup
timestamps yourself.
As a part of my backup script I also need to deal with freeing up enough
removable disk space for the pending backup session. My backup target
disk is managed as a set of folders, one per VM, and based on the
predicted backup size I roll though all the VM folders, sort that vm's
backup directory based on time, and remove only however many old backup
archive files from each directory that I need in order to free up that
required amount of space. This way I am guaranteed to have at least N
backups of each VM and only the older archives are removed as newer ones
are created.
Its a great feature that Qubes keeps tabs on the previous backup
timestamps in its VM database. That makes the complexity of custom
backups easy to manage using very simple bash/python scripting.
Steve