---
name: "gfarm_url_section_replicate_from_to"
section: "3"
platform: "linux"
package: "libgfarm-dev"
version: "2.4.1-1.1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/gfarm_url_section_replicate_from_to"
---

# gfarm\_url\_section\_replicate\_from\_to(3)

Create a file replica of a file section

## NAME

gfarm\_url\_section\_replicate\_from\_to - Create a file replica of a file section

## SYNOPSIS

**#include \<gfarm/gfarm.h\>**

**char \*gfarm\_url\_section\_replicate\_from\_to (const char \****gfarm\_url***, char \****section***, char \****srchost***, char \****dsthost***);**

## DESCRIPTION

**gfarm\_url\_section\_replicate\_from\_to()** creates a file replica of a file section *section* of a file *gfarm\_url* from a source host *srchost* to a destination host *dsthost*.

File section is an architecture name for executable files, or is a fragment index for a regular file.  Note that a fragment index needs to be specified in string without any unnecessary space character and zero padding.

When there is no file copy on a host specified by *srchost*, **gfarm\_url\_section\_replicate\_from\_to()** returns error.

## RETURN VALUES

- **NULL**

  The function terminated successfully.

- **GFARM\_ERR\_NO\_MEMORY**

  Insufficient memory was available.

- **GFARM\_ERR\_NO\_SUCH\_OBJECT**

  A component used as a directory in *gfarm\_url* does not exist, or a file copy does not exist on the specified source host.

- **GFARM\_ERR\_TEXT\_FILE\_BUSY**

  The file *gfarm\_url* cannot be replicated because it is being updated by another process.

- **Others**

  An error except the above occurred.  The reason is shown by its pointed strings.

## SEE ALSO

[**gfarm\_url\_section\_replicate\_to**(3)](/gfarm_url_section_replicate_to/3.md), [**gfarm\_url\_fragments\_replicate**(3)](/gfarm_url_fragments_replicate/3.md)
