What's new

New to ASUS-Merlin - Copy Script Question

  • 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!

JOSHSKORN

New Around Here
Hi, I'm very new to ASUS-Merlin, as I just installed it on my ASUS RT-AC87U this past weekend.

How can I learn about installing a script onto my router, that will copy one attached USB Device (USB1) to a second attached USB Device (USB2)? I want the router to do this automatically at 3 am, daily. I plan on using XCopy from a Windows 10 computer to update USB1 with the client's local files as soon as a network connection is established at bootup.

This is a sample of the xcopy script that I will be using from client to USB1. I want the script from USB1 to USB2 to have the same or similar parameters.

Code:
/D:m-d-y    Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.
/E  Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T.
/C  Continues copying even if errors occur.
/Q  Does not display file names while copying.
/H  Copies hidden and system files also.
/R  Overwrites read-only files.
/K  Copies attributes. Normal Xcopy will reset read-only attributes.
/Y  Suppresses prompting to confirm you want to overwrite an existing destination file.

Any help anyone can provide to me would be great. Thank you.
 
I admire your willingness to learn. That said, if you are just starting with Linux, then there is really not a good simple straight forward answer to give you. There is a couple of ways you can go to accomplish this (dd, rsync, cp, tar, etc). As far as scheduling the job, you will need to add a cron job via a user script.

Start out reading this page; https://github.com/RMerl/asuswrt-merlin.ng/wiki

Check out items 1, 2, & 7 of the usage items in particular.
 

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