Ask Your Question
2

How to copy in HDD externe ?

asked 2014-10-16 11:47:27 -0600

kaf-laarous gravatar image

updated 2014-10-18 00:02:12 -0600

Hello,

Using terminal, How to to copy my Home in HDD externe ?

edit retag flag offensive close merge delete

Comments

@kat-laarous Use "rsync"

somethingSomething gravatar imagesomethingSomething ( 2014-10-16 23:27:38 -0600 )edit

how to use rsync ? rsync for transfer my home to server ??

kaf-laarous gravatar imagekaf-laarous ( 2014-10-17 03:33:05 -0600 )edit
florian gravatar imageflorian ( 2016-02-08 11:42:02 -0600 )edit

3 Answers

Sort by » oldest newest most voted
3

answered 2014-10-18 13:41:07 -0600

updated 2015-06-23 12:49:05 -0600

Welcome to ask.fedoraproject.

If your external hard drive is not mounted use:

root ~ # fdisk -l

to find your partition, and then mount it:

root ~ # mkdir /YOUR-MOUNTPOINT-NAME-HERE(MAKE IT UP)
root ~ # mount /dev/sdb1 /YOUR-MOUNTPOINT-NAME-HERE

Note that /dev/sdb1 is just an example, and you need to find the device name of your device, with f.e.k.s fdisk -l

Side note:

If you want to make the mount automatic and survive reboots, edit your /etc/fstab

then:

root ~ # df -h

should show your new mounted partition:

Filesystem                       Size  Used Avail Use% Mounted on
/dev/mapper/fedora_Hostname-root   89G   99M   84G   1% /
devtmpfs                         5.8G     0  5.8G   0% /dev
/dev/sda2                        477M  113M  335M  26% /boot
/dev/sda1                        200M  9.7M  191M   5% /boot/efi
external-hard-drive                ?G  584K  ?G   1% /YOUR-MOUNTPOINT-NAME-HERE

If you need to copy a few files from your external hard drive to your local drive use the cp command. For information on commands type in the terminal:

man YOUR-COMMAND-HERE

Example:

man cp

Output(some of it):

CP(1)                            User Commands                           CP(1)  

NAME
       cp - copy files and directories

If you want to backup, restore or copy large files or a lot of data, use rsync:

man rsync

rsync(1)                                                              rsync(1)

NAME
       rsync - a fast, versatile, remote (and local) file-copying tool

SYNOPSIS
       Local:  rsync [OPTION...] SRC... [DEST]

       Access via remote shell:
         Pull: rsync [OPTION...] [USER@]HOST:SRC... [DEST]
         Push: rsync [OPTION...] SRC... [USER@]HOST:DEST

       Access via rsync daemon:
         Pull: rsync [OPTION...] [USER@]HOST::SRC... [DEST]
               rsync [OPTION...] rsync://[USER@]HOST[:PORT]/SRC... [DEST]
         Push: rsync [OPTION...] SRC... [USER@]HOST::DEST
               rsync [OPTION...] SRC... rsync://[USER@]HOST[:PORT]/DEST

       Usages with just one SRC arg and no DEST arg will list the source files
       instead of copying.

DESCRIPTION
       Rsync is a fast and extraordinarily versatile file  copying  tool.   It
       can  copy  locally,  to/from  another  host  over  any remote shell, or
       to/from a remote rsync daemon.  It offers a  large  number  of  options
       that  control  every  aspect  of  its behavior and permit very flexible
       specification of the set of files to be copied.  It is famous  for  its
       delta-transfer  algorithm,  which  reduces the amount of data sent over
       the network by sending only the differences between  the  source  files
       and  the  existing  files in the destination.  Rsync is widely used for
       backups and mirroring and as an improved copy command for everyday use.

       Rsync finds files that need to be transferred  using  a  "quick  check"
       algorithm  (by  default) that looks for files that have changed in size
       or  in  last-modified  time.   Any  changes  in  the  other   preserved
       attributes  (as  requested by options) are made on the destination file
       directly when the quick check indicates that the file’s data  does  not
       need to be updated.

Here is the rsync command I use:

My rsync command:

Dry run(Dry run means a test run, nothing is copied):

rsync -vrnh --progress /home/user /BACKUP/Backup/

Real thing:

rsync -hvr --progress /home/user /BACKUP/Backup/

Backup/Update:

rsync ...
(more)
edit flag offensive delete link more

Comments

1

For backup on /home, use the archive mode, option -a.

florian gravatar imageflorian ( 2016-02-08 11:41:23 -0600 )edit
0

answered 2014-10-16 15:46:51 -0600

tonioc gravatar image

1) identify you external device, using 'df' or 'mount' command (it will probably appear in or near the last line). For example

$ df
/dev/sdb1                         15637500  12528812    3108688  81% /run/media/myname/3EBB77B85E82AA26

2) use cp to copy there. For example:

$ cp /home/myname /run/media/myname/3EBB77B85E82AA26
edit flag offensive delete link more

Comments

i don't know where is my hard externe:

Sys. de fichiers                blocks de 1K   Utilisé Disponible Uti% Monté sur
/dev/mapper/fedora_dhcppc1-root     51475068  18401696   30435548  38% /
devtmpfs                             1946756         0    1946756   0% /dev
tmpfs                                1955092         0    1955092   0% /dev/shm
tmpfs                                1955092      9068    1946024   1% /run
tmpfs                                1955092         0    1955092   0% /sys/fs/cgroup
tmpfs                                1955092         0    1955092   0% /tmp
/dev/sda8                             487652    113940     344016  25% /boot
/dev/mapper/fedora_dhcppc1-home    169137200 153041436    7481060  96% /home
kaf-laarous gravatar imagekaf-laarous ( 2014-10-17 03:29:57 -0600 )edit

it looks like it is not mounted. What happens on your desktop when you plug the disk? For example on KDE desktop, the device appears in dolphin ready to be mounted, and an icon on the task bar also allows to mount it. What desktop do you use?

tonioc gravatar imagetonioc ( 2014-10-18 12:33:54 -0600 )edit
0

answered 2016-05-30 16:02:35 -0600

Utilites dump/rescue

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-10-16 11:47:27 -0600

Seen: 864 times

Last updated: May 30 '16