Trying to back up NAS to Amazon Cloud Drive

I just subscribed to amazon cloud drive (ACD) and want to back up the shares on my Freenas box. I have a laptop that I installed ubuntu on that I wanted to use to sync the nas with the ACD. My original plan was to use Rsync to upload an encrypted backup, but I think I'm in over my head.

My questions are:

How do I mound the freenas cifs shares on my laptop to be used with rsync

How do I use rsync to push the files up to ACD.

Can I encrypt the files as they are uploaded to ACD.

Am I insane and going about this the wrong way?

Thanks for your help guys.

Check out this post I prepared earlier for how to mount a samba share on your ubuntu machine.

What options do you have for accessing your amazon storage? If it were me I would use encfs on the amazon storage. So you'd mount the amazon storage, then create a encfs mount on that storage and then rsync to that. The reason I suggest that is that it will encrypt each file at the file level rather than if you used an encrypted image. If you used an encrypted image you would have to upload the whole thing every time you changed a file, with encfs you will only need to upload the files which have changed.

1 Like

You can use this to mount the ACD on linux

Towards the bottom it says how to use this command line tool to mount the amazon storage.

So lets say you now have three mount point: ~/nas, ~/acd, ~/acd-enc where nas is the mount point for your NAS, acd is the amazon storage and acd-enc is for the encfs mount.

With the amazon storage mounted create a folder on it called encfs or whatever. Then run this command (make sure encfs is installed):

encfs ~/acd/encfs ~/acd-enc

It'll start a configuration and ask for a password.

Once that is mounted you just run rsync from ~/nas to ~/acd-enc. The files will be encrypted by encfs and stored in an encrypted form on your amazon storage.

obviously use whatever mount points you decided to use when setting it up.

To unmount encfs when you're done run fusermount -u ~/acd-enc

1 Like

So I'm trying to mount the network share, when I run

sudo mount -a

I'm prompted for a password with the message

Password for root@//192.168.1.10/storage

And when I enter the root password for the Freenas box I receive the error

mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

running

tail -f /var/log/kern.log

returns the following

Jan 1 11:05:42 wolololo kernel: [54440.154538] CIFS: Unknown mount option "0"
Jan 1 11:07:39 wolololo kernel: [54556.213730] CIFS: Unknown mount option "0"
Jan 1 11:09:50 wolololo kernel: [54687.169066] RPC: Registered named UNIX socket transport module.
Jan 1 11:09:50 wolololo kernel: [54687.169071] RPC: Registered udp transport module.
Jan 1 11:09:50 wolololo kernel: [54687.169073] RPC: Registered tcp transport module.
Jan 1 11:09:50 wolololo kernel: [54687.169075] RPC: Registered tcp NFSv4.1 backchannel transport module.
Jan 1 11:09:50 wolololo kernel: [54687.192241] FS-Cache: Netfs 'nfs' registered for caching
Jan 1 11:13:17 wolololo kernel: [54894.193108] CIFS: Unknown mount option "0"
Jan 1 11:13:48 wolololo kernel: [54925.858485] CIFS: Unknown mount option "0"
Jan 1 11:14:50 wolololo kernel: [54987.706216] CIFS: Unknown mount option "0"

My fstab line is as follows:

//192.168.1.10/storage /media/nasMount username=anonymous,password=,uid=1000,gid=1000,users,auto 0 0

Sorry to be a bother, I'm basically in an entirely Windows environment at work, so cutting my teeth on linux at home feels a bit alien at times. I'm going to try to mount the ACD share with the tool you linked though.

Edit:

I figured it out! My shares aren't PW protected (I'm horrible I know.)

the correct fstab line was:

//192.168.1.10/storage  /nasShare  cifs  guest,uid=1000,iocharset=utf8  0  0

So far I have the network share + the acd mounted, working on ENCFS now.

1 Like