/mnt/cdrom
/mnt/nfs
/iscsi
/boot
/var
I'd like to skip all other file systems mounted at / and only make backup of local / and not /boot, /var, /iscsi, and /mnt/cdrom etc. How do I force tar to use a single file system under Linux / UNIX / BSD operating systems?
The --one-file-system option ask the tar command not to cross mount points and stay in local file system when creating / updating archives. The syntax is as follows:
tar zcvf /path/to/file.tar.gz --one-file-system fileSystemsIn this example, make a backup of / file system to /dev/st0 without crossing file system boundaries, enter:
tar zcvf /path/to/file.tar.gz --one-file-system /
tar cvf /dev/st0 --one-file-system /
No comments:
Post a Comment