Is this a rsync example?

Dear all,
I have few questions regarding rsync and I would like to ask for some advice.

So far I am having all my Documents (folder inside /home/user/Documents/Documents-remoteServer) folders in a remote server, I mount that one through sshfs and currently I am having quite few problems with its performance.

I have decided
a. buy a new large hard disk
b. move all that remote content locally to my hard disk
c. use that remote space only for backing up files

1)If I understand right this brings into the game rsync which can make “accurate” copies. If that is right can u give me few hints houw the command should like when I copy the files from remote server to a local hard disk now?

  1. Lets say that one is complete I am also thinking to use the old remote server to taking backups file of my work. If I understand it right rsync would only copies changes to files made and this will reduce a lot the network throughput needed. Is not that right? I gues a crontab entry of rsync would make it work. The only thing that concerns me now if how rsync will behave when at the beginning the local files that I would have on my hard disk (those that were copied at step one) would be 99% same with those in the remote server. Would that be a problem?

I would like to thank you for your help and support

B.R
Alex

alaios wrote:
> Dear all,
> I have few questions regarding rsync and I would like to ask for some
> advice.
>
> So far I am having all my Documents (folder inside
> /home/user/Documents/Documents-remoteServer) folders in a remote server,
> I mount that one through sshfs and currently I am having quite few
> problems with its performance.
>
> I have decided
> a. buy a new large hard disk
> b. move all that remote content locally to my hard disk
> c. use that remote space only for backing up files
>
> 1)If I understand right this brings into the game rsync which can make
> “accurate” copies. If that is right can u give me few hints houw the
> command should like when I copy the files from remote server to a local
> hard disk now?

It would be better for you to develop your knowledge and self-confidence
by you trying to make it work yourself, and then come back and ask any
particular problems that you encounter and can’t fix.

Asking us for help before you try is not going to advance your learning
and wastes everybody’s time.

You can experiment with rsync quite easily and safely just by coying
some small part of your file structure. And use the dry run feature.

> 2) Lets say that one is complete I am also thinking to use the old
> remote server to taking backups file of my work. If I understand it
> right rsync would only copies changes to files made and this will reduce
> a lot the network throughput needed. Is not that right? I gues a crontab
> entry of rsync would make it work. The only thing that concerns me now
> if how rsync will behave when at the beginning the local files that I
> would have on my hard disk (those that were copied at step one) would be
> 99% same with those in the remote server. Would that be a problem?
>
> I would like to thank you for your help and support
>
> B.R
> Alex

you are right :slight_smile:

so this is what I want to do and this is also what I have read about

I have cloned my old hard disk to one of larger size so to have more space for my Documents folder.

Everything looks to be ok but still I need some help to complete it right, plus it always good to have some confirmation.

My Documents folder used to be on the network which I was mounting through sshfs, as this was too slow. I decided to

a. “Download” all that network folder locally so to have all my files. For that I used the following command with root permission

rsýnc -rv user@host:/home/user/Documents/ /home/user/Documents/

Do you see anything weird to that? For me it looks like it worked fine, with only having to change file permissions.

b. I confirmed that action (that all files are copied by)

rsýnc -rcnv user@host:/home/user/Documents/ /home/user/Documents/

which returned 20 files out of the 10.000 with most of those being date changes in svn files (some local copies to specific place in my hard disk done by crontab, nothing important)

c. Then I want to “convert” my old network Documents folder to backup folder. I guess here that I would need to make some crontab entry that would look like that: (not tested)

Code:

rsýnc -rv  /home/user/Documents/ user@host:/home/user/Documents/ 

c.1: Do you see anything wrong in my thinking or in the provided command in c?
c.2: c.1 just would make copies of the files is not that right?

I would like to thank you in advance for your help

B.R
Alex

W dniu 30.04.2012 o 07:46 alaios <alaios@no-mx.forums.opensuse.org> pisze:

>
> you are right :slight_smile:
>
> so this is what I want to do and this is also what I have read about
>
>
>
> I have cloned my old hard disk to one of larger size so to have more
> space for my Documents folder.
>
> Everything looks to be ok but still I need some help to complete it
> right, plus it always good to have some confirmation.
>
> My Documents folder used to be on the network which I was mounting
> through sshfs, as this was too slow. I decided to
>
> a. “Download” all that network folder locally so to have all my files.
> For that I used the following command with root permission
>
>
>
>
> Code:
> --------------------
> rsýnc -rv user@host:/home/user/Documents/ /home/user/Documents/
> --------------------
>
> Do you see anything weird to that? For me it looks like it worked fine,
> with only having to change file permissions.
>

If You would use -a option You wouldn’t have to change permissions.

-i option is very nice IMHO (itemize changes as far as I remember
-n is great as well (shows You what it will do but does nothing)


Best regards,
Greg

I would like to thank you for your answer… it seems that you also can not find anything wrong… In that case I just need to move to c) and add a crontab entry. Is not that right?

Regards
Alex

W dniu 30.04.2012 o 09:56 alaios <alaios@no-mx.forums.opensuse.org> pisze:

>
> I would like to thank you for your answer… it seems that you also can
> not find anything wrong… In that case I just need to move to c) and add
> a crontab entry. Is not that right?
>
> Regards
> Alex
>
>
Yes. Like I said I would go with -a instead of -r but if it works as You
expect it to than create the cron entry.


Best regards,
Greg

On 2012-04-30 08:04, Grzegorz Listwan wrote:

I use


--archive --acls --xattrs --hard-links --del --stats --human-readable

>
> -i option is very nice IMHO (itemize changes as far as I remember
> -n is great as well (shows You what it will do but does nothing)

Interesting.

Another interesting switch: --bwlimit=KBPS


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I would like to thank you all for your constructive replies…

It seems that I am having some slight problem with rsync.
I want to download my network folder to an external hard disk.

The command I used is the (it was runing before I got your answers)


sudo rsync -rv username@hist:/home/apa/Documents/ /media/a9f299d7-9775-404d-a073-fcbc28b3f3c0/BackupRemoteBeforeConvertingToBackupApril2010/

the /media/a9f… is the external hard disk.

After that finished my hard disk contains 17,5 Gb.
If I login to the remote host with ssh username@hist, and then write du -hc Documents/
this will return that the folder contains

51G total

The external hard disk has enough space for the copy paste procedure. What might be doing wrong here?

B.R
Alex

W dniu 02.05.2012 o 08:16 alaios <alaios@no-mx.forums.opensuse.org> pisze:

>
> I would like to thank you all for your constructive replies…
>
> It seems that I am having some slight problem with rsync.
> I want to download my network folder to an external hard disk.
>
> The command I used is the (it was runing before I got your answers)
>
> Code:
> --------------------
> sudo rsync -rv username@hist:/home/apa/Documents/
> /media/a9f299d7-9775-404d-a073-fcbc28b3f3c0/BackupRemoteBeforeConvertingToBackupApril2010/
> --------------------

What is the output of this command ? Do You get any errors ?

>
>
> the /media/a9f… is the external hard disk.
>
> After that finished my hard disk contains 17,5 Gb.
> If I login to the remote host with ssh username@hist, and then write du
> -hc Documents/
> this will return that the folder contains
>
> 51G total
>
>
> The external hard disk has enough space for the copy paste procedure.
> What might be doing wrong here?
>
> B.R
> Alex
>
>


Best regards,
Greg

My bad is was permission problem and the normal user could not access all files.

I am sorry for that.

Alex

W dniu 02.05.2012 o 10:16 alaios <alaios@no-mx.forums.opensuse.org> pisze:

>
> My bad is was permission problem and the normal user could not access
> all files.
>
> I am sorry for that.
>
> Alex
>
>
Don’t be sorry :slight_smile: it’s always good to ask questions if not sure.


Best regards,
Greg

On 2012-05-02 08:16, alaios wrote:
> the /media/a9f… is the external hard disk.

Create a label for that filesystem, and it will be mounted on
/media/[label], not that rigmarole of a name.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)