- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - Linux
- >
- System Administration
- >
- incremental backup fail
-
- Forums
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- OEM Solutions
- Servers: The Right Compute
- Shifting to Software-Defined
- Telecom IQ
- Transforming IT
- Infrastructure Solutions German
- L’Avenir de l’IT
- IT e Trasformazione Digitale
- Enterprise Topics
- ИТ для нового стиля бизнеса
- Blogs
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Forums
-
Blogs
-
InformationEnglish
- 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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-28-2009 01:45 AM
07-28-2009 01:45 AM
incremental backup fail
test-back:/devel_x098 # find /devel_x098/AchDev_dvl1/ -mtime -1 -type f -print
/devel_x098/AchDev_dvl1/M AHSAN/text/16BIT_roof108_ROOF.jpg
/devel_x098/AchDev_dvl1/M AHSAN/text/New Folder/Thumbs.db
/devel_x098/AchDev_dvl1/M AHSAN/text/New Folder/brick222225.psd
/devel_x098/AchDev_dvl1/ADEEL AHMED/STATUS REPORT OF 09-07-09.ods
test-back:/devel_x098 # find /devel_x098/AchDev_dvl1/ -mtime -1 -type f -exec cp -rv bck/ {} \;
cp: cannot overwrite non-directory `/devel_x098/AchDev_dvl1/M AHSAN/text/16BIT_roof108_ROOF.jpg' with directory `bck/'
cp: cannot overwrite non-directory `/devel_x098/AchDev_dvl1/M AHSAN/text/New Folder/Thumbs.db' with directory `bck/'
cp: cannot overwrite non-directory `/devel_x098/AchDev_dvl1/M AHSAN/text/New Folder/brick222225.psd' with directory `bck/'
cp: cannot overwrite non-directory `/devel_x098/AchDev_dvl1/ADEEL AHMED/STATUS REPORT OF 09-07-09.ods' with directory `bck/'
test-back:/devel_x098 # ls bck/
test-back:/devel_x098 #
test-back:/devel_x098 # find /devel_x098/AchDev_dvl1/ -mtime -1 -type f -exec cp -v bck/ {} \;
cp: omitting directory `bck/'
cp: omitting directory `bck/'
cp: omitting directory `bck/'
cp: omitting directory `bck/'
test-back:/devel_x098 # ls bck/
test-back:/devel_x098 #
the 'bck' is empty.
please help
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-28-2009 03:20 AM
07-28-2009 03:20 AM
Re: incremental backup fail
> [...] exec cp -v bck/ {} \;
Are you trying to copy "bck/" into some file,
or some file into "bck/"?
"man cp"?
When you figure out the difference between
cp a b
and
cp b a
you might also wish to look at "cp -p".
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-28-2009 04:08 AM
07-28-2009 04:08 AM
Re: incremental backup fail
I got the mistake the right way is
find /devel_x098/AchDev_dvl1/ -mtime -1 -type f -exec cp -v {} bck/ \;
and the command is working.
But instead of running the above command, if I run the following command
find /devel_x098/AchDev_dvl1/ -mtime -1 -type d -exec cp -rv {} bck/ \;
then if a single file is modified/created the whole directory backs up.
e.g under "/devel_x098/AchDev_dvl1/TEST/CORE", if I just create a file or modified a file, then complete "devel_x098/AchDev_dvl1/TEST/CORE" backs up.
actually I want to use the second command because I have several 'same name' file under sub-directories of "/devel_x098/AchDev_dvl1/", so I want to sustain the directories too.
Regards
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-28-2009 07:11 AM
07-28-2009 07:11 AM
Re: incremental backup fail
> too.
"tar" may be more useful than "cp" for this.
For example:
ra# mkdir bck
ra# tar cf - root/fred/lame1.c | ( cd bck ; tar xf - )
ra# ls -lR bck
bck:
total 2
drwxr-xr-x 3 root root 512 Jul 28 10:09 root
bck/root:
total 2
drwxr-xr-x 2 root root 512 Jul 28 10:09 fred
bck/root/fred:
total 2
-rw-r--r-- 1 root root 192 Mar 5 2008 lame1.c
ra#
GNU "tar" has some more helpful options to
use in situations like this, but any old
"tar" can be made to work. A Forum search
for keywords like
tar pipeline
may find more detailed examples.
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2019 Hewlett Packard Enterprise Development LP