- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: how to delete the files that are not part of t...
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
Forums
Discussions
Discussions
Discussions
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
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
10-20-2008 07:56 PM
10-20-2008 07:56 PM
how to delete the files that are not part of the backup
# tar cvzf /usr.tar.gz /usr
then install some packages that creates some files and directories under /usr
e.g
# rpm -ivh OpenOffice
# rpm -ql OpenOffice
##some individual files created under /usr
/usr/bin/oocalc
/usr/bin/oowriter
/usr/sbin/ooinstdict
/usr/share/applications/base.desktop
##some directories created under /usr
/usr/lib/ooo-2.0
/usr/share/doc/packages/OpenOffice_org
how can I restore the /usr, so that once we restore the /usr via backup(usr.tar.gz), all new directories and files that are not part of the backup(usr.tar.gz) will be deleted
Regards
Maaz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2008 08:05 PM
10-20-2008 08:05 PM
Re: how to delete the files that are not part of the backup
restore?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2008 08:06 PM
10-21-2008 08:06 PM
Re: how to delete the files that are not part of the backup
>Delete everything in /usr, and then do the
restore?
ok, it means that there is no automatic(via tar ) way.
It means that to achieve the target, I first have to boot the system in rescue mode, then delete /usr, then I can restore from the backup
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2008 07:52 AM
10-23-2008 07:52 AM
Re: how to delete the files that are not part of the backup
Then use
rsync --dry-run --itemize-changes --archive --delete /copy/user /
to see what changes will be made.
And if all the changes look OK use
rsync --archive --delete /copy/usr /
to actually make the changes.
Be careful with those commands.
And watch to be sure that you have enough room for a second copy of /usr.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2008 05:11 PM
10-24-2008 05:11 PM
Re: how to delete the files that are not part of the backup
You may be able to restore to another location, then move the directories around.
Or compare the two and delete what you don't want.