Online backup script
#5
(11-28-2014, 10:59 PM)xoft Wrote: sudo mkdir /mnt/backup
sudo mount -t cifs //smbhost/path/folder /mnt/backup -o user=UserName
Did you use a user from the windows machine was there a promt for password?

Quote:ls /mnt/backup
Could you see some files from windows machine?


Quote:touch /mnt/backup/mytest.txt
So far only the last part fails, the mounted share is writable only by root.

This will be solved by using the right user for the smb mount or running the backup script as root.

I think the smb mount should be done on reboot, so i will try to explain how to do that later.


Now next part, the scp connect. Try to use this script at the raspberry. It will connect and create a new folder and copy one file inside. Make sure the destination path is in the home folder of the user you are using

#!/bin/bash

user="USER"
host="example.com"
port=22
dest="/path/of/create/newfolder"
src="1234.567"


touch 1234.567
ssh -p $port $user@$host "mkdir -p $dest" && scp -rp -P $port $src $user@$host:$dest

exit


let me know if this works for you. actually, do you have some experience with linux?
Reply
Thanks given by:


Messages In This Thread
Online backup script - by xoft - 11-28-2014, 08:06 AM
RE: Online backup script - by nouseforname - 11-28-2014, 02:46 PM
RE: Online backup script - by xoft - 11-28-2014, 06:15 PM
RE: Online backup script - by xoft - 11-28-2014, 10:59 PM
RE: Online backup script - by nouseforname - 11-29-2014, 12:27 AM
RE: Online backup script - by nouseforname - 11-29-2014, 01:00 AM
RE: Online backup script - by xoft - 11-30-2014, 05:17 AM
RE: Online backup script - by nouseforname - 11-30-2014, 05:24 AM
RE: Online backup script - by xoft - 11-30-2014, 06:39 AM
RE: Online backup script - by xoft - 11-30-2014, 08:07 PM
RE: Online backup script - by nouseforname - 11-30-2014, 08:52 PM



Users browsing this thread: 1 Guest(s)