Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

Options To Use During Backup

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
Gnustome
Asked:
Gnustome
1 Solution
 
jlevieCommented:
"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
 
GnustomeAuthor Commented:
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
 
yuzhCommented:
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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now