Re: SCP backup script

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Mike Hoy
Date:  
To: plug-discuss
Subject: Re: SCP backup script
scp -rp /home/user/music/ root@192.168.2.161:/mnt/LaptopBackup/user/music/

btw, doesn't copy NEW folder overs. I have to make them manually?

for example the /music/ folder had been backed up previously.

but now it has a new subdir in it.

that new subdir is not copied over AND old subdirs iwth new items are not copied over.

it's weird.

so then i tried rsync:

rsync -e ssh -a /home/user/music/* root@192.168.2.161:/mnt/LaptopBackup/user/music/

and that worked fine.

i will check out rsnapshot too.

thanks all!



mike hoy




Mike Hoy wrote:

> oh!
>
> i tried something similar, but i was leaving the trailing / on there.
> and was getting file not found, so i switched to *.mp3 and it worked.
> but now it really works
>
> thanks.
>
> Jeremy C. Reed wrote:
>
>> On Tue, 25 Jan 2005, Mike Hoy wrote:
>>
>>
>>
>>> scp -rp /home/user/music/*.mp3
>>> root@192.168.2.161:/mnt/LaptopBackup/user/music/
>>>
>>> and all of the *.mp3's copy over.
>>>
>>> that would be fine if I had all of my *.mp3 files in one big directory
>>> but i don't
>>>
>>> in /music i have more directories for each band..
>>>
>>> i would just like to copy an entire directory with all of it's sub
>>> directories.
>>>
>>
>> Get rid of the "/*.mp3" and just scp -rp the entire /home/user/music
>> directory (assuming that is okay).
>>
>> You may want to use rsync if you will be repeating this.
>>
>> Jeremy C. Reed
>>
>> BSD News, BSD tutorials, BSD links
>> http://www.bsdnewsletter.com/
>>
>> ---------------------------------------------------
>> PLUG-discuss mailing list -
>> To subscribe, unsubscribe, or to change you mail settings:
>> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>>
>>
>>
>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>


---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss