- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Copy filesystems with tar
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2001 01:52 PM
тАО09-25-2001 01:52 PM
cd sourcedir; tar -cf - . | (cd targetdir; tar -xf -)
But, I received this error with some directories:
time stamp 2007-02-04 13:56:12 is 175265582 s in the future.
I need a tar parameter or another command (dump, cpio) that ignore dates and time when its copying files.
I used --atime-preserve tar parameter but it didn't work or I don't know how to use it.
I will appreciate any help, thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2001 04:52 PM
тАО09-25-2001 04:52 PM
Re: Copy filesystems with tar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-26-2001 06:06 AM
тАО09-26-2001 06:06 AM
Re: Copy filesystems with tar
To copy with dump:
The only obstacle is the that it will include the full path in the restore. Here's an example assuming copying of /home to /home2
dump -0 -f - /home | (cd /home2; restore -x -f -)
This works well, except that the home directory will appear under /home2 and then you just need to use move to rename it to where it should be.
CPIO: Example where permissions are preserved:
find . -depth -print |
cpio -plvdmu /outputdest
It will copy the directory you are in to outputdest and preserve everything.
For tar, your command is fine, except that I'd add a -p on the untar for preserve:
tar -cf - . | (cd targetdir; tar -xpf -)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-26-2001 06:15 AM
тАО09-26-2001 06:15 AM
Re: Copy filesystems with tar
If you want to make backups of filesystems, use dump, which is designed exactly to solve this problem.
In your case, you might even consider just using dd to make an exact image of the filesystem. It can't do incremental backups, but it doesn't sound like that's what you're after.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-26-2001 05:13 PM
тАО09-26-2001 05:13 PM
Re: Copy filesystems with tar
filesystems. As is the script requires the destination
be empty. You will likely want to change this.
The extract is verbose, and preserves permissions.
While the timestamp in the future message is just a
warning, it is a symptom of a possibly serious problem.
If the problem persists and applies to different files
you have a time syncronization problem.
If your system is ever compromized, forget the
timestamps in the log files. Setup xntpd, and
syncronize all the system that can write to this
file system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2001 11:53 AM
тАО09-27-2001 11:53 AM
Re: Copy filesystems with tar
"No such file or directory while opening filesystem
restore: Tape is not a dump tape".
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2001 12:38 PM
тАО09-27-2001 12:38 PM
Solution"It might be considered a bug that this version of dump can only handle ext2 filesystems. Specifically, it does not work with FAT filesystems."
Since the filesystem you are trying to dump is remote (NFS), this version of dump can't handle it.
You're going to have to use cpio, tar, or dd if you want to do it locally.