Categories
Fixing Stuff Samuel

Setting up and using rsync on 2 external machines

This post is just some notes as I learn how to utilize rsync between 2 servers that are on separate networks. rsync is ideally suited for this task because it will only transfer files that have changed instead of blindly transferring all files and wasting bandwith (which seems trivial but if you are using this to power website backups for example, that will mean the difference of transferring your entire site vs transferring only files that have been changed)

1.) Create your rsync shell script, example script below:
rsync -avz /path/to/back/up/files/on/server/ username@host.com:/path/on/your/backup/machine/

2.) Upload the file to the machine that you will be pushing from (make sure to make it executable by running chmod +x on the file after uploading it)

3.) SSH into the machine and test the command by running ./filename

If all goes well your machine will connect and if its the first time it will ask you to verify the fingerprint of the external machine, type yes and hit enter. Your off to the races, to automate this script simply create a cron job to execute the shell script at whatever interval you like.

Troubleshooting:

If you are having trouble establishing the connection here are some things to try:

1.) make sure you are using the correct port (22 is the default ssh port, but its a good idea to not use this port for added security so if you need to add another port then update your command to:
rsync -avz -e 'ssh -p port#' /path/to/back/up/files/on/server/ user@host.com:/path/on/your/backup/machine/

2.) If your connection is timing out you can test it by running:
ssh user@host.com -p port#

or by running

telnet host.com port#

If both of these test connections are displaying time out errors to you, then there is a firewall issue on your host machine preventing the connection from routing correctly to your backup machine.

3.) If you can’t get the script to connect, just try to manually SSH into the external machine first. You will either run into the improper port being open, or the SSH auth is not allowed in freenas on the machine.

Troubleshoting the actual rsync:

1.) If the rsync command generates a weird folder on the external machine do ________
2.) If the rsync command won’t sync files from the external machine onto the local machine do _______

Categories
Fixing Stuff Samuel Technology

quick note on setting up offsite sftp backups

So this is just a quick post, essentially notes from setting up offsite backups using SFTP (formally FTP, but upgrading for security).

1.) Open a port in your rourter to all SSH connections to pass through (Wan > virtual server/port forwarding)
2.) Pick a non standard SSH port to limit your networks exposure to unwanted connection requests
3.) Connection to your local machine, in my case a Freenas machine and turn on SSH and allow tcp port forwarding (this option allows for the FTP connection to piggy back on your SSH connection, allowing the SFTP connection)
4.) If FTP connections are not turned on yet on your Freenas machine, turn those on
5.) Test your SSH connection using putty on your local network (use your ip, and port # then connect with your username/password)
6.) Test your SFTP connection using flash fxp or filezilla (again enter in your IP/hostname and proper port then user/pass)

If everything goes as follows locally, the next step is to test the connections from an external network. Again if all goes according to plan then the last step is to connect manually from the host machine you will be downloading files from.

**This last step is important. You need to do this in order to “save the keys” from the external machine. If you notice when you first made the SFTP connection through flash fxp it asked if you wanted to “save the key” for the server as it was new.

Categories
Samuel Thoughts

FLoating

So I’ve been doing exactly what you told me not too. The past few weeks I haven’t fully engaged in life, and maybe I haven’t ever since the day you passed away, if I’m honest. The best way I can describe it is I’m skimming along the surface, not 100% present in any activity that I’m doing. I’ve had the same issue of “not being able to engage” when i try to dream about you as well. That has never happened any time in my life before…. I wonder what you would say about that…… My gut tells me you would say that “I’m not processing and accepting the situation. Not processing your passing”. I think that’s pretty accurate because if I sit alone and think about it, or write any thoughts about you it doesn’t take long before I tear up…..My work ethic has also suffered quite a bit lately, I find myself thinking about your advice for work very often. Sometimes It feels like what I should do, like what I need to do to enjoy life more….. I’ll keep thinking about that. It would be such a big change….

Anyway we had a big party tonight, definitely missed you. I think Steve really liked Ellen’s parents, pretty sure you would really have liked them too…. Hopefully I’ll see you at our next monthly meeting.

Categories
Julia Shorts

that thing

You would be the best person t0 share

on this particular subject and

you’re the one I cannot ask about this particular subject.

I’ve written in journals, poems for college classes –

thought about it in Paris in Florida and California.

talked to friends and then talked to friends some more.

Ignored it, at one point I completely misunderstood it

and once even thought – It was gone!

but on a random Thursday afternoon I was wishing

you could give your advise and tell me

if it’s worth it

the gamble

for potential disasters or

to build something new.

Categories
Samuel Thoughts

Dreaming

My first 2 attempts at dreaming about you have not worked. But tonight I can feel your presence. I’ve herd your voice in the back of my head lately, more almost as a manifestation of my own conscience. I’m not sure what to make of this.

Its undeniable though. I feel your joy about a decision my mom and I made tonight, about a direction we took. I could here your words “good boy Sammy, thanks for listening” you also offered to help guide us through the process which I gladly accepted and appreciated. When I asked you if you had any other advice you had the following. “Steven Don’t do it alone”. Alex “its about time”….Time for what? I didn’t catch that last part or I did I just forget…. “Linda enjoy the twins they are a blessing” (did you mean triplets or were you trying to warn us about something?)

—Update—

Maybe you were telling me to talk to Alex, that its about time I do that. After a conversation with Steve tonight this dot connected for me, I think you were saying “Alex its about time” as in its about time to reach out to him and talk with him.