---
name: "xfsdq"
section: "8"
platform: "linux"
package: "xfsdump"
version: "2.2.27-1"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/xfsdq"
---

# xfsdq(8)

XFS dump and restore quota

## NAME

xfsdq, xfsrq - XFS dump and restore quota

## SYNOPSIS

```
xfsdq [ -g|-u ] [ -f path ] filesystem
xfsrq [ -g|-u ] xfsdump_quotas
```

## DESCRIPTION

**xfsdq** outputs a summary of the disk quotas for the specified XFS filesystem for either all users declared in the local */etc/passwd* file, or all groups declared in the local */etc/group* file.

The output format exactly matches that produced by the IRIX *repquota* command, given the **-e** option. The format contains two lines for each user/group - the first line contains the filesystem device file, the second contains the uid/gid, block soft limit, block hard limit, inode soft limit, and finally the inode hard limit (in that order).

**xfsdump** runs **xfsdq** on those filesystems with quota enabled, and sends the output to a file (standard output, by default) which is subsequently stored on the dump device. For user quota, this file is named *xfsdump\_quotas*, for group quota it is named *xfsdump\_quotas\_group*. Thus, the primary purpose of **xfsdq** is to maintain this dump file format between IRIX and Linux, such that **xfsdump** backups remain interchangable.

**xfsrq** is a simple wrapper around [**setquota**(8)](/setquota/8.md) which automates the restoration of quota information using this *xfsdump\_quotas* file.

The **-f** option specifies the file to which **xfsdq** will write. This file must not already exist (it is created by **xfsdq**).

The **-u** (user) option specifies user quota should be reported. This is the default.

The **-g** (group) option specifies that group quota are to be reported.

The *filesystem* argument should be the filesystem mount point, and not the device.

## RESTORE

In order to restore quota information using the output from **xfsdq**, one must first restore a copy of the *xfsdump\_quotas* file from the dump device.

On Linux, user quota can then be restored using:

```
        # xfsrq -u xfsdump_quotas
```

On IRIX, the equivalent command is:

```
        # edquota -i xfsdump_quotas
```

## NOTES

Only user quota are supported by both Linux and IRIX. Group quota are not supported on IRIX and project quota are not supported on Linux.

The soft and hard block limits reported by **xfsdq** are in units of 512 bytes for compatibility with IRIX. The Linux quota utilities, e.g. [**quota**(1)](/quota/1.md) and [**repquota**(8)](/repquota/8.md), report blocks in units of 1024 bytes - **xfsrq** performs the necessary conversions automatically.

## FILES

- **/etc/mtab**

  default filesystems

- **/etc/passwd**

  default set of users

- **/etc/passwd**

  default set of groups

## SEE ALSO

[quota(1)](/quota/1.md), [repquota(8)](/repquota/8.md), [setquota(8)](/setquota/8.md), [xfsdump(8)](/xfsdump/8.md), [xfs(5)](/xfs/5.md).
