jkockler
asked on
How to specify root directory with rsync
On a Linux Ubuntu box
I am attempted to tell rsync to back up all data on my hard drive but I keep getting errors.
If I specify root as /
I get error "skipping directory"
I have an external usb hd connected, all I want is to get rsync to back up every file on my hard drive to that external hard drive.
I am attempted to tell rsync to back up all data on my hard drive but I keep getting errors.
If I specify root as /
I get error "skipping directory"
I have an external usb hd connected, all I want is to get rsync to back up every file on my hard drive to that external hard drive.
if you want to take backup
/var, /root, /etc directory,
you sould define those seperately [ some one said you can have all directory in one like /var /etc /root, but i never tryed that, ] but bottom line is you should speicify seperatly]
you will have to say something like this [ its just the sample script ]
rsync -e ssh -avz --delete root@beaver:/var/ $DESTROOT/Directory_name
rsync -e ssh -avz --delete root@beaver:/etc/ $DESTROOT/Directory_name
rsync -e ssh -avz --delete root@beaver:/root/ $DESTROOT/Directory_name
/var, /root, /etc directory,
you sould define those seperately [ some one said you can have all directory in one like /var /etc /root, but i never tryed that, ] but bottom line is you should speicify seperatly]
you will have to say something like this [ its just the sample script ]
rsync -e ssh -avz --delete root@beaver:/var/ $DESTROOT/Directory_name
rsync -e ssh -avz --delete root@beaver:/etc/ $DESTROOT/Directory_name
rsync -e ssh -avz --delete root@beaver:/root/ $DESTROOT/Directory_name
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
how do I know if it is mounted successfully in /mnt/external? .. It shows up in file browser as a drive and if I go into it, the path shows /media/disk
Why do I have to back up each folder individually? That does not seem right.
Why do I have to back up each folder individually? That does not seem right.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok, but I do not see a source specified in those commands. I am assuming that it will copy the directory I run the command from? How do I get to the absolute top of the tree?
if you have /var, /etc and otehr directory, then i dont think just only put
/ will copy , you need to specify either
/var /etc /root in one line
or in different line as i said in my post
also, how to check if its mounted as oklit said,
do mount command it will show you.
also, if you can write any file in the mounted direcotry that mean its mounted properly
/ will copy , you need to specify either
/var /etc /root in one line
or in different line as i said in my post
also, how to check if its mounted as oklit said,
do mount command it will show you.
also, if you can write any file in the mounted direcotry that mean its mounted properly
which way are you trying ??
There is source specified :)
At the end there is: / /mnt/external. First / is source, then /mnt/external is destination.
At the end there is: / /mnt/external. First / is source, then /mnt/external is destination.
ASKER
nice ... it's running now... As it started, It said "sending incremental file list" ?? ... Does that man If I send the same command to the same place later on, will it only send the data that has been modified since the last backup?
I am going to post another thread here shortly on directory structure.
I am going to post another thread here shortly on directory structure.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Also, is that second command grabbing the boot and mbr files too?
No, it won't touch mbr at all. rsync is for directories/files only.
ASKER
you said to to use the 'exclude' only if my internal has 2 partitions... Why would it not rsync itself with only one partition on the internal? The external still shows up as a directory under media which is under the root, right?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Very good sir.. Is there a command to exclude the trash?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
can i see the script ??