What's new

Auto Copy Files to NAS

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

tonysamson

Regular Contributor
Hi,

I'm new to this forum and I'm looking into installing the Asuswrt-Merlin firmware for my router. What made me interested into this firmware is the ability to run scripts. More particularly, I am interested in a script that would copy all my new photos and other files in my camera (using PQI aircard), Android devices and if possible my laptops when it is connected to the router.

I've read somewhere in this forum that it is possible to trigger a script when a device connects to the router. Can I have some tips and advice on how to write this kind of a backup/ auto copy script?

I'm not a programer so I will be needing all the advice that you can give.

Thank you so much for your help.
 
RMerlin & ryzhov_al,

thanks for the replies. I'll read the links you gave me and hopefully it will get going... Thanks again.
 
There is an option to have DNSMASQ (the dhcp server within the firmware) to run a script when a new lease is issued or deleted;

# Run an executable when a DHCP lease is created or destroyed.
# The arguments sent to the script are "add" or "del",
# then the MAC address, the IP address and finally the hostname
# if there is one.
#dhcp-script=/bin/echo

So you could in theory add a custom addition to the DNSMASQ config /jffs/configs/dnsmasq.conf.add then create a script with reads in the MAC address and DHCP lease action i.e. add and then run commands like rsync to back up your data automatically.

I haven't tried this so this is just a theory but the DNSMASQ man page indicates this type of scripting is possible.
 
Thanks again for all the inputs.

As for my Android phones I used an app on my phones called Sweet Home Image Backup. It automatically backups my photos and others once I connect to my home network.

Also, to make it simpler for me, I just used Windows backup for my PCs and Time Machine for my Mac.

My only problem right now is how to automatically backup mg PQI Air Card since it doesn't have any interface like like the android phones, PCs and Macs.

However, considering that I also have Western Digital's My Book Live (MBL) attached to my network I think one of the options for me is to install and configure Rsync to automate backup for my PQI Air card... will it be easier to do it in the Router or in the MBL?

I guess for a newbie like me, I'll find out this weekend. Once again, thank you so much for the inputs.
 
However, considering that I also have Western Digital's My Book Live (MBL) attached to my network I think one of the options for me is to install and configure Rsync to automate backup for my PQI Air card... will it be easier to do it in the Router or in the MBL?

While I appreciate other would do this for the challenge , my rule of thumb , being not as tech savvie as I used to be , if I can easilly automate something that works on a device outside of the router , I go that route.

I only try and use the router itself for stuff that needs to be central to the network and I can't automate elsewhere.

So far it's worked for me.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top