A systems administrator wants to back up the directory data - CompTIA Linux + XK0-005

Question

A systems administrator wants to back up the directory /data to /backup/data on a remote server remote.
Which command will achieve this?
 

Answers
  1. correct
Explanation

Correct Answer: c. rsync -a /data remote:/backup/

The correct command is rsync -a /data remote:/backup/ because rsync is a powerful tool for efficient and secure backups. The -a (archive) option ensures that all file permissions, timestamps, symbolic links, and directory structures are preserved. 

It is optimized for syncing large directories, supports incremental transfers, and works seamlessly over SSH when copying to a remote server, making it ideal for remote backups like this one.

Why the other options are incorrect:

  • a. scp -p /data remote:/backup/data: scp can copy files recursively with -r, but -p only preserves file timestamps and permissions, not directory structures or symlinks. Also, scp doesn't handle incremental changes efficiently and may fail with large or complex directory trees, making it less suitable for backups compared to rsync.
  • b. ssh -i /remote:/backup/ /data: This syntax is incorrect. ssh is used for remote command execution, not file copying. The format here does not specify a valid command structure or copy syntax, so it will fail outright.
  • d. cp -r /data /remote/backup/: cp -r is used for local file copying. /remote/backup/ implies a remote system path, but cp cannot access remote systems unless mounted via NFS or similar. This command will fail unless /remote/backup/ is a locally mounted remote path, which isn't stated here.
     

Related Courses

Discover a range of courses designed to provide you with the knowledge and skills needed to excel in your chosen field.

a prepsaret exam featured image
CompTIA Prep

220-1201 - CompTIA A+ Exam Core 1

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

220-1202 - CompTIA A+ Exam Core 2

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA SecurityX CAS-005

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud Essentials+ CLO-002

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Network+ N10-009

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Security+ SY0-701

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Data + DA0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Pentest+

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA CySA+ CSO-003

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA DataSys+ DS0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Tech+ FC0-U71

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud+ CV0-004

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Server+ SK0-005

Start Course Prep

Easy way to pass your test within a week with prepsaret

You don’t need one month to study and pass your test.
With Prepsaret, it takes you a few days to grasp all the concepts needed to pass your exams

View Courses Offered