New to ASUS-Merlin - Copy Script Question

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

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.
 

Jeffrey Young

Regular Contributor
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.
 

Latest threads

Sign Up For SNBForums Daily Digest

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