backup bug with backuplocation being only a directory?
Alan Schmitt <[email protected]> Sat, 30 Jan 2016 15:29:52 +0100
| Newsgroups | gmane.network.unison.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I’m setting up some unison backups and I think I have stumbled upon
a bug. The problem is when the backupprefix preference is a directory:
after the backup directory is created, it is proposed to be synchronized
for the following sync.
Here is a detailed example:
With this profile
--8<---------------cut here---------------start------------->8---
root = /Users/schmitta/tmp/unison_test/a
root = /Users/schmitta/tmp/unison_test/b
backup = Name *
backuplocation = local
backupprefix = .unisonbak/
backupsuffix = .$VERSION
--8<---------------cut here---------------end--------------->8---
If I do the following (I assume a and b are created and empty):
% unison testbak
Contacting server...
Looking for changes
Reconciling changes
Nothing to do: replicas have not changed since last sync.
% touch a/foo
% unison testbak -batch
Contacting server...
Looking for changes
Reconciling changes
new file ----> foo
a : new file modified on 2016-01-30 at 15:22:39 size 0 rw-r--r--
b : absent
Propagating updates
UNISON 2.48.3 started propagating changes at 15:22:52.16 on 30 Jan 2016
[BGN] Copying foo from /Users/schmitta/tmp/unison_test/a to /Users/schmitta/tmp/unison_test/b
[END] Copying foo
UNISON 2.48.3 finished propagating changes at 15:22:52.16 on 30 Jan 2016
Saving synchronizer state
Synchronization complete at 15:22:52 (1 item transferred, 0 skipped, 0 failed)
% ls -al a b
a:
total 0
drwxr-xr-x+ 3 schmitta staff 102 Jan 30 15:22 .
drwxr-xr-x+ 4 schmitta staff 136 Jan 30 15:21 ..
-rw-r--r--+ 1 schmitta staff 0 Jan 30 15:22 foo
b:
total 0
drwxr-xr-x+ 3 schmitta staff 102 Jan 30 15:22 .
drwxr-xr-x+ 4 schmitta staff 136 Jan 30 15:21 ..
-rw-r--r--+ 1 schmitta staff 0 Jan 30 15:22 foo
% echo hello > a/foo; unison testbak -batch
Contacting server...
Looking for changes
Reconciling changes
changed ----> foo
a : changed file modified on 2016-01-30 at 15:23:49 size 6 rw-r--r--
b : unchanged file modified on 2016-01-30 at 15:22:39 size 0 rw-r--r--
Propagating updates
UNISON 2.48.3 started propagating changes at 15:23:50.46 on 30 Jan 2016
[BGN] Updating file foo from /Users/schmitta/tmp/unison_test/a to /Users/schmitta/tmp/unison_test/b
[END] Updating file foo
UNISON 2.48.3 finished propagating changes at 15:23:50.46 on 30 Jan 2016
Saving synchronizer state
Synchronization complete at 15:23:50 (1 item transferred, 0 skipped, 0 failed)
% ls -al a b
a:
total 8
drwxr-xr-x+ 3 schmitta staff 102 Jan 30 15:22 .
drwxr-xr-x+ 4 schmitta staff 136 Jan 30 15:21 ..
-rw-r--r--+ 1 schmitta staff 6 Jan 30 15:23 foo
b:
total 8
drwxr-xr-x+ 4 schmitta staff 136 Jan 30 15:23 .
drwxr-xr-x+ 4 schmitta staff 136 Jan 30 15:21 ..
drwxr-xr-x+ 3 schmitta staff 102 Jan 30 15:23 .unisonbak
-rw-r--r--+ 1 schmitta staff 6 Jan 30 15:23 foo
# until here all is as expected, but …
% unison testbak
Contacting server...
Looking for changes
Reconciling changes
a b
<---- new dir .unisonbak [f]
Note that the bug does not happen if the prefix is more than
a directory, for instance:
backupprefix = .unisonbak/bak__
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ (Updated January 29, 2016, Mauna Loa Obs.): 402.60 ppm
_______________________________________________
Unison-hackers mailing list
[email protected]
http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers
signature.asc
(application/pgp-signature, 472 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJWrMjgAAoJEAQNCjtO0uXHrOUIAJ//+IGyzn1vlXmyP6IQIG1j Gk3fat6yPOcyZ+rkeN6gifU0t5O7WX65L6P89Z8UG7s8rj/WhPwqoLZP/3dJg9Ev eb4xvlQu2y2ou3NRflcP6fEjs0ME0/LtnpzUpeWYjFrUeBzaom4CiX5894e/v6kv mEr1Wf23bWSDDCHYgXD6YdmOWzXe2TONWl9d+uLoibPkPEyaMlg+pMSHkRCr4T7e vVopwaHFfc7mEXidCs+6DBhiueYzNVNigtcxuUeIvJRa2HX+xkFVf+bx2wYwLPZ2 xp3dDiQ0+R/bW0yT1+dvfXyaSb2ggceUgD5YpWPapMQqfwc04UhrXFO1tgYoyak= =6CLK -----END PGP SIGNATURE-----