`b2 sync`: Empty regular files are created for path components, with workaround

Aperta
#1,142 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
cli

Direzione di ricerca

The payload names only the b2 sync command with --incremental-mode and --exclude-regex, and it does not point to any source file. Start by reproducing the bug: sync a source containing some/path/filename.ext into an empty local destination and check whether an empty file appears at some/path. Then find where the sync code creates destination files and how it handles directory components of a key. Done means nested keys produce directories, and the existing workaround regex is no longer needed.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

more-information-needed

I don't have a log, but consider on dest the path some/path/filename.ext.

b2 sync --threads=1 --max-download-streams-per-file 1 --exclude-regex '(.*[.]tmp)' --incremental-mode $src $dest

This will create an empty regular file some/path, so on Linux some/path/filename.ext errors.

A workaround is to exclude trailing /:

b2 sync --threads=1 --max-download-streams-per-file 1 --exclude-regex '(.*[.]tmp)|(.*/$)' --incremental-mode $src $dest

Note that my /tmp is mounted noexec, so I'm running like:

TMPDIR=~/tmp b2 version
b2 command line tool, version 4.6.0 (b2sdk version 2.10.3)
Lingua principale
Python
Stelle
638
Fork
138
Merge medio
8h 27m
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Backblaze/B2_Command_Line_Tool

Tutte le issue di Backblaze/B2_Command_Line_Tool

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.