Rocksolid Light

News from da outaworlds

mail  files  register  groups  login

Message-ID:  

You love peace.


comp / comp.unix.bsd.freebsd.misc / Re: Are files overwritten in place by sftp?

SubjectAuthor
* Are files overwritten in place by sftp?<bp
`* Re: Are files overwritten in place by sftp?Steven G. Kargl
 `* Re: Are files overwritten in place by sftp?<bp
  `- Re: Are files overwritten in place by sftp?Steven G. Kargl

1
Subject: Are files overwritten in place by sftp?
From: <bp@www.zefox.net>
Newsgroups: comp.unix.bsd.freebsd.misc
Organization: A noiseless patient Spider
Date: Sun, 17 Nov 2024 17:28 UTC
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: <bp@www.zefox.net>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Are files overwritten in place by sftp?
Date: Sun, 17 Nov 2024 17:28:40 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <vhd948$nate$2@dont-email.me>
Injection-Date: Sun, 17 Nov 2024 18:28:41 +0100 (CET)
Injection-Info: dont-email.me; posting-host="53b8de9ea921bef151cddbada3ac601c";
logging-data="764846"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19NfRJ7/9gIoiHs2NPrXHBoEByCQdQ1ntI="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (FreeBSD/14.1-RELEASE-p5 (arm64))
Cancel-Lock: sha1:GxzR7NSEWxli2aKE1XjSWSTB2ak=
View all headers

In the event one copies a file or directory over an existing
file or directory is the duplicate written to the same physical
blocks in storage, or are new physical blocks written with the
old blocks marked free?

The situation in mind is using get -r to copy a remote directory,
then changing or adding a few files to the remote directory followed
by using get -r to get the directory a second time. Clearly, changed
files will require writing new blocks on the destination, but what
about files with unchanged paths and contents?

The question is motivated by concerns about limited-life storage
media such as flash.

Thanks for reading,

bob prohaska

Subject: Re: Are files overwritten in place by sftp?
From: Steven G. Kargl
Newsgroups: comp.unix.bsd.freebsd.misc
Organization: A noiseless patient Spider
Date: Sun, 17 Nov 2024 19:50 UTC
References: 1
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: sgk@REMOVEtroutmask.apl.washington.edu (Steven G. Kargl)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Are files overwritten in place by sftp?
Date: Sun, 17 Nov 2024 19:50:59 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <vhdhf3$ptqv$1@dont-email.me>
References: <vhd948$nate$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 17 Nov 2024 20:51:00 +0100 (CET)
Injection-Info: dont-email.me; posting-host="206212796f0d1519f4d808029b434b11";
logging-data="849759"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/xN4DVuBvzMMcUPXiNGD28"
User-Agent: Pan/0.145 (Duplicitous mercenary valetism; d7e168a
git.gnome.org/pan2)
Cancel-Lock: sha1:pYkxH2uKOm+MmeMEyJaD2Se5avo=
View all headers

On Sun, 17 Nov 2024 17:28:40 +0000, bp wrote:

> In the event one copies a file or directory over an existing
> file or directory is the duplicate written to the same physical
> blocks in storage, or are new physical blocks written with the
> old blocks marked free?
>
> The situation in mind is using get -r to copy a remote directory,
> then changing or adding a few files to the remote directory followed
> by using get -r to get the directory a second time. Clearly, changed
> files will require writing new blocks on the destination, but what
> about files with unchanged paths and contents?
>
> The question is motivated by concerns about limited-life storage
> media such as flash.

From the description, it seems that you are looking for
the net/rsync port. The first time it is executed, it
will copy the directory. Additional invocations of rsync
will only copy modified files. rsync also allows you
to exclude files from being copied such as *.o which can
change quite often.

--
steve

Subject: Re: Are files overwritten in place by sftp?
From: <bp@www.zefox.net>
Newsgroups: comp.unix.bsd.freebsd.misc
Organization: A noiseless patient Spider
Date: Sun, 17 Nov 2024 23:35 UTC
References: 1 2
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: <bp@www.zefox.net>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Are files overwritten in place by sftp?
Date: Sun, 17 Nov 2024 23:35:56 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <vhduks$shdk$1@dont-email.me>
References: <vhd948$nate$2@dont-email.me> <vhdhf3$ptqv$1@dont-email.me>
Injection-Date: Mon, 18 Nov 2024 00:35:56 +0100 (CET)
Injection-Info: dont-email.me; posting-host="94efef249b9f74a309097f7c8e620c2a";
logging-data="935348"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+GBmwHd8uUlQx/pcD9gLsotr66UimtNgE="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (FreeBSD/14.1-RELEASE-p5 (arm64))
Cancel-Lock: sha1:R3+c47O4WwBOTapBnF93icQoOcA=
View all headers

Steven G. Kargl <sgk@removetroutmask.apl.washington.edu> wrote:
> On Sun, 17 Nov 2024 17:28:40 +0000, bp wrote:
>
>> In the event one copies a file or directory over an existing
>> file or directory is the duplicate written to the same physical
>> blocks in storage, or are new physical blocks written with the
>> old blocks marked free?
>>
>> The situation in mind is using get -r to copy a remote directory,
>> then changing or adding a few files to the remote directory followed
>> by using get -r to get the directory a second time. Clearly, changed
>> files will require writing new blocks on the destination, but what
>> about files with unchanged paths and contents?
>>
>> The question is motivated by concerns about limited-life storage
>> media such as flash.
>
> From the description, it seems that you are looking for
> the net/rsync port. The first time it is executed, it
> will copy the directory. Additional invocations of rsync
> will only copy modified files. rsync also allows you
> to exclude files from being copied such as *.o which can
> change quite often.
>

Your surmise is correct, but I wanted to use sftp out of familiarity.
I'm compiling net/rsync now to have a look at it, but I'm still
curious how file overwrites, whether across the net or locally, are
handled.

Thanks for writing!

bob prohaska

Subject: Re: Are files overwritten in place by sftp?
From: Steven G. Kargl
Newsgroups: comp.unix.bsd.freebsd.misc
Organization: A noiseless patient Spider
Date: Mon, 18 Nov 2024 02:19 UTC
References: 1 2 3
Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: sgk@REMOVEtroutmask.apl.washington.edu (Steven G. Kargl)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Are files overwritten in place by sftp?
Date: Mon, 18 Nov 2024 02:19:48 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <vhe884$ta7u$1@dont-email.me>
References: <vhd948$nate$2@dont-email.me> <vhdhf3$ptqv$1@dont-email.me>
<vhduks$shdk$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 18 Nov 2024 03:19:49 +0100 (CET)
Injection-Info: dont-email.me; posting-host="3f380336c79be2b46fc022a35c0af98f";
logging-data="960766"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6P2CLxSvboZxNHojvxFFZ"
User-Agent: Pan/0.145 (Duplicitous mercenary valetism; d7e168a
git.gnome.org/pan2)
Cancel-Lock: sha1:gLs1lY5uydtfCxkibM1+AtuqrfE=
View all headers

On Sun, 17 Nov 2024 23:35:56 +0000, bp wrote:

> Steven G. Kargl <sgk@removetroutmask.apl.washington.edu> wrote:
>> On Sun, 17 Nov 2024 17:28:40 +0000, bp wrote:
>>
>>> In the event one copies a file or directory over an existing
>>> file or directory is the duplicate written to the same physical
>>> blocks in storage, or are new physical blocks written with the
>>> old blocks marked free?
>>>
>>> The situation in mind is using get -r to copy a remote directory,
>>> then changing or adding a few files to the remote directory followed
>>> by using get -r to get the directory a second time. Clearly, changed
>>> files will require writing new blocks on the destination, but what
>>> about files with unchanged paths and contents?
>>>
>>> The question is motivated by concerns about limited-life storage
>>> media such as flash.
>>
>> From the description, it seems that you are looking for
>> the net/rsync port. The first time it is executed, it
>> will copy the directory. Additional invocations of rsync
>> will only copy modified files. rsync also allows you
>> to exclude files from being copied such as *.o which can
>> change quite often.
>>
>
> Your surmise is correct, but I wanted to use sftp out of familiarity.
> I'm compiling net/rsync now to have a look at it, but I'm still
> curious how file overwrites, whether across the net or locally, are
> handled.

It likely depends on the underlying filesystem, but I suspect in
general that if a file has changed on the system from which you
are doing the copy, the file on the destination will be written
to storage without recycling older parts from a previous transfer.

--
steve

1

rocksolid light 0.9.8
clearnet tor