- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- incremental backup fail
Operating System - Linux
1752679
Members
5544
Online
108789
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО07-28-2009 01:45 AM
тАО07-28-2009 01:45 AM
incremental backup fail
/devel_x098 is a samba server share(windows xp users access this directory)...and I have to take regular backups of this directory(/devel_x098)
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
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
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2009 03:20 AM
тАО07-28-2009 03:20 AM
Re: incremental backup fail
> [...] -exec cp -rv bck/ {} \;
> [...] 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".
> [...] 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
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2009 04:08 AM
тАО07-28-2009 04:08 AM
Re: incremental backup fail
thanks Steven for reply
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
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
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2009 07:11 AM
тАО07-28-2009 07:11 AM
Re: incremental backup fail
> [...] I want to sustain the directories
> 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.
> 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.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP