Solved

Options To Use During Backup

Posted on 2003-11-19
3
233 Views
Last Modified: 2013-12-15
I am running Debian 2.4.18.  When making a backup of /boot to /mnt/Linux.Backup I used cp -vR /boot /mnt/Linux.Backup.  An error message occurred when it got to /boot/boot.b.  It said: cp: Cannot create symbolic link 'mnt/Linux.Backup/boot/boot.b': Operation not permitted

Can I/Should I use cp -vRH to follow command-line symbolic links?
0
Comment
Question by:Gnustome
3 Comments
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
"cp" is the wrong tool to use to create a backup as it can't deal with some of the special file types essential to the operation of a Linux system. You need to be using cpio or dump.
0
 

Author Comment

by:Gnustome
Comment Utility
I want to keep both backup and restore as simple as possible, while still being reliable.  Do you recommend cpio or dump?  And what options should I specify?
0
 
LVL 38

Accepted Solution

by:
yuzh earned 200 total points
Comment Utility
Agreed with jlevie, you need to use cpio, or dump/restore to do the job.

Here's the examples:

Asssume that /mnt/Linux.Backup  is a mounted filesystem

1) use cpio:

cd /

find boot -print | cpio -oacv | (cd /mnt/Linux.Backup ; cpio -icdmuv )

2) use dump/restore

cd /

dump 0uf - boot | (cd /mnt/Linux.Backup ; restore rf -)

The systax for restore the file from /mnt/Linux.Backup  is the same, just
need to change the dirnames to the one you wanted.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now