Main Menu

Search

Showing posts with label linux xfs commands. Show all posts
Showing posts with label linux xfs commands. Show all posts

LINUX: How To Backup and Restore The Data Inside XFS Filesystem on the Linux Hosts?

XFS filesystem can be backed up on Linux hosts using xfsdump.

Below are steps.

Install xfsdump package if it does not exist.

 dnf -y install xfsdump

Backup the xfs filesystem using below xfsdump command.

xfsdump -f <filename>.dump <xfs filesystem to backup>

For example if you want to backup /var/lib/containers XFS filesystem and save the dump to /apps/images.dump, your command will look as follows:

xfsdump -f /apps/images.dump /var/lib/containers

Restore XFS filesystem from backup dump

If you want to restore the XFS filesystem from dump, use below command

xfsrestore -f <filename>.dump <xfs filesystem to restore to>

For example if you want to restore to /var/lib/containers XFS filesystem from the dump /apps/images.dump, your command will look as follows:

xfsrestore -f /apps/images.dump /var/lib/containers



Keywords:

backup backing restore restoring disasterrecovery DR disaster recover recovering dump file files original state 



LINUX: XFS Command To Check the Label of the XFS Mount / Partition

Below XFS Command can be used to Check the Label of the XFS Mount / partition

xfs_admin -l /dev/nbd0p1

Below is the sample output.

# xfs_admin -l /dev/nbd0p1
label = "test-label"

Keywords:

Check Checking Label Labels Mount Mounts point points verify verifying validate validating commands partition partitions