Backing up a file system (/etc)
1. To backup the /etc/ filessystem to a file called “/tmp/mybackup”, issue the following command:
# cd /tmp
# xfsdump -0f mybackup /dev/mapper/rhel-root -s etc
where:
-f: do the dump to the file “mybackup”
-0: do full backup (1 means incremental)
-s: backup the etc subtree from the filesystem /dev/mapper/rhel-root
Restoring the file system (/etc/)
1. To list all the created dumps with detailed information:
# xfsrestore -I
2. To restore a particular dump:
# xfsrestore –f mybackup /tmp
where:
-f: restore from the file “mybackup”
Interactive Restore
1. This exercise enables you to navigate through the backup file “mybackup”, and allows you to restore selected files instead of perfuming a full restore:
# cd /tmp
# xfsrestore –if mybackup /tmp
2. Once you get the restore prompt, you may ls and cd commands to navigate and list the files inside the backup file.
3. Select the files you want to restore by using the add command:
# add yum.conf
4. Once the selection is complete, write extract to restore the selected files.
Recent Comments