RSYNC to local hdd

Status
Not open for further replies.

rnicolas

Explorer
Joined
Sep 20, 2011
Messages
51
Is it possible to rsync/backup your volume to a local hdd also attached the motherboard?

For example, let's say i have a 2 x 1TB hdds mirrored (/mnt/vol1)
And I have another 1TB hard drive as /mnt/vol2.

Can I rsync /mnt/vol1 to /mnt/vol2?

Thank you.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Is it possible to rsync/backup your volume to a local hdd also attached the motherboard?

For example, let's say i have a 2 x 1TB hdds mirrored (/mnt/vol1)
And I have another 1TB hard drive as /mnt/vol2.

Can I rsync /mnt/vol1 to /mnt/vol2?

Thank you.

Hi rnicolas

Yes, do you want to do it just once or on a schedule?

If just once you need to do it from the command line. Once you find the command that works for you, if you want to repeat it regulary, you can add it as a Cron job in the GUI.

Search the forum for details because this questions has been asked & answered repeatedly here in the forums.
 

rnicolas

Explorer
Joined
Sep 20, 2011
Messages
51
I would like to do it on a schedule so I suppose I would have to do it as a CRON job. Great thanks I will search around and find the commands :smile:
I'm glad this is possible so another desktop won't have to be used to save on some money.
 

rnicolas

Explorer
Joined
Sep 20, 2011
Messages
51
One more thing.
If /mnt/vol2 (my back up drive) is formatted to UFS, would any other Linux OS be able to see the data?
I ask this, since I saw in another thread, that ZFS isn't compatible with Solaris unless you change it to MBR...

edti: Can't find a command that let's me rsync from one volume to another on the same server.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Yes, that's a very good article, I have it saved. I suppose I should add something to the FAQ about rsync and add that link too because there have been a ton of questions like yours lately.

It's really very simple:

rsync -av /mnt/vol1/folder /mnt/vol2 (notice that there are no slashes after the last directory in each path)

-a (archive) will recurse and copy subfolders

--progress is nice if you want to sit and watch

Since you said you want to do it on a schedule, I would recommend --log-file so you can check and make sure there were no problems.

Example: rsync -av --log-file=/mnt/vol1/rsync.log /mnt/vol1/folder /mnt/vol2
 

rnicolas

Explorer
Joined
Sep 20, 2011
Messages
51
Perfect, thanks protosd.
To run this as a CRON job do you i just enter that command in the "Command" field? Or do I have to point it to the script file?

and you prefefer -a (archive) instead of -z (compress)???
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
To run this as a CRON job do you i just enter that command in the "Command" field? Or do I have to point it to the script file?
You should just be able to put it in the command field. (This will also save it in the database if you upgrade, where a script file will need to be backed up separately)

you prefefer -a (archive) instead of -z (compress)???

Compress is more useful when you are copying across the network to help speed things up. It puts a load on your processor and it's not necessary when copying from local disks.

The -a includes other options (look at man page), but most importantly it includes -r which gets subfolders.
 

rnicolas

Explorer
Joined
Sep 20, 2011
Messages
51
I see, very nice. I will give this a try, thanks!
edit: thanks, i got it to work and I didn't have to enable my RSYNC service. I assume the service is just to RSYNC over the network... :smile:
 
Status
Not open for further replies.
Top