---
name: "vzfsync"
section: "8"
platform: "linux"
package: "vzctl"
version: "4.9.4-6"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://carta.tech/man/vzfsync"
---

# vzfsync(8)

perform fsync/fdatasync/fadvise on files

## NAME

vzfsync - perform fsync/fdatasync/fadvise on files

## SYNOPSIS

**vzfsync** { **-s**,**--sync** \| **-d**,**--datasync** } \[**-n,--dontneed**\] **file** \[**file** *...*\]

**vzfsync** **--help**

## DESCRIPTION

This utility performs [**fsync**(2)](/man/fsync/2.md) or **[fdatasync(2)](/man/fdatasync/2.md)** for every supplied file name. It can also optionally perform [**posix\_fadvise**(2)](/man/posix_fadvise/2.md) with the argument of **POSIX\_FADV\_DONTNEED**.

It is used from within [**vzmigrate**(8)](/man/vzmigrate/8.md) utility for live migration, right after copying ploop delta files (and before suspending a container) to sync those copied files to disk in order to optimize subsequent ploop mount time and, utlimately, container frozen time.

## OPTIONS

- **-s**,**--sync**

  Perform fsync.

- **-d**,**--datasync**

  Perform fdatasync.

- **-n**,**--dontneed**

  Perform posix\_fadvise(POSIX\_FADV\_DONTNEED).

## EXIT STATUS

Returns 0 upon success, or an appropriate error code in case of an error:

- 1

  Invalid usage

- 2

  Failed to perform some requested operations on one or many files.

## SEE ALSO

[**fsync**(2)](/man/fsync/2.md), [**fdatasync**(2)](/man/fdatasync/2.md), [**posix\_fadvise**(2)](/man/posix_fadvise/2.md).

## LICENSE

Copyright (C) 2014, Parallels, Inc. Licensed under GNU GPL v2.
