What's new

Remote backup with Rsync fails

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

...and here is the e2fsck cammand on /dev/sda5
Code:
TTT-Admin@1080-Router:/tmp/home/root# umount /tmp/mnt/AsusflashDrive
TTT-Admin@1080-Router:/tmp/home/root# e2fsck -fv /dev/sda5
e2fsck 1.42.8 (20-Jun-2013)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

        3348 inodes used (0.68%, out of 491520)
           6 non-contiguous files (0.2%)
          17 non-contiguous directories (0.5%)
             # of inodes with ind/dind/tind blocks: 181/13/0
       85205 blocks used (4.33%, out of 1966080)
           0 bad blocks
           0 large files

        2084 regular files
         162 directories
           0 character device files
           0 block device files
           0 fifos
           0 links
        1093 symbolic links (1092 fast symbolic links)
           0 sockets
------------
        3339 files
 
As an example is it ok to say that if on day two I unmount a disk/partition, and then mount the same disk or another one, the unmount and the post-mount scripts will be runned ?

That's correct. Any time a disk gets mounted by the firmware, whether at boot time, or by hot plugging a new disk, post-mount gets executed after the firmware is done mounting the disk.
 
Remembering that the best is often the enemy of the good, I removed the flash drive, keeping just the USB3 disk (with 2 partitions, including one for swapping), and made my scripts simpler.

I'm using 2 scripts:
  • Post-mount on my WD usb3 disk for:
    -make a backup of the JFFS partition
    -copy rsa_id and known_hosts from JFFS to ~/.ssh :mad:
  • services-start for: :)
    -activate the swap space
    -set the swappiness
    -schedule the external backup at midnight every day
    -schedule the end of the bakup at 07:00 every morning
Everything is going well with the exception of the copy to ~/.ssh
When I execute the 2 cp commands from the terminal it is working well, but not from the script. Does the script have the same rights ?
Code:
  cp /jffs/dropbear/dropbear_rsa_host_key ~/.ssh/rsa_id
   cp /jffs/dropbear/known_hosts ~/.ssh/known_hosts

Also each time I reboot the USB disk is going through a scan (very long...), and the disk is not available until it is finished. :mad: I'm now looking at the ntfsck tool but all suggestions are welcome. I did a chkdsk on the disk, without error.
 
Just read through this huotg01
You are a trooper. Definitely not giving up without a fight!

:) I have to admit that it would have been much easier to just run the remote backup from another linux box because much of the problems come from the fact that the Asus router is not exactly done for that with its limited RAM and its transient "disk" structure. Anyways, it is going to work... In fact it works as soon as the WD 4 Tb disk is mounted (which could take one hour...). I have to find out why it scans the disk every time it is connected, or every time the router is rebooted (even if the disk is clean, as confirmed by chkdsk. This is something new, and I don't think it is related to the backup process.
 
For the script issue can you try this. Make the first line of the script the shebang with a -x for some extra debugging output.

Code:
#!/bin/sh -x

and run the script in ssh session. Remember to check that the script is executable. Does it work? If yes then just remove the -x.

Incidentally I would replace the tilde ~ character with $HOME but that's just a personal coding style.
 
It runs full steam ahead now. I'm scared...
I don't know how you guys do to solve this kind of problems but in Montreal we have L'Oratoire St-Joseph
Nothing like lighting a few candles... ;-)

Seriously it's working now. Still a few glitches, but nothing in the critical path.
 
Last edited:
For those interested...
Things working well, I just took the remote disk to my place in order to make the initial copy faster (and less expensive: my bandwidth is not $ "illimited").
Will probably re-install the disk on the remote site tomorrow and re-test.
 
my bandwidth is not $ "illimited").

Bhell or Vidéotron? :)

You should take a look at Teksavvy. They offer both ADSL (through Bell) and cable connections (through Vidéotron), with a 300 GB monthly quota. And generally cheaper than even when you take into account the combo rebates the two big incumbents give you.
 
Bhell or Vidéotron? :)
You should take a look at Teksavvy. They offer both ADSL (through Bell) and cable connections (through Vidéotron), with a 300 GB monthly quota. And generally cheaper than even when you take into account the combo rebates the two big incumbents give you.
I'm with Videotron. Teksavvy is new for me. Very interesting, even more when we consider that from 02:00 to 08:00 usage is not counted in the total bandwidth... :) Thanks.
 
I'm with Videotron. Teksavvy is new for me. Very interesting, even more when we consider that from 02:00 to 08:00 usage is not counted in the total bandwidth... :) Thanks.

We've been a Teksavvy wholesaler at my job for 5-6 years now, so I got a good amount of first-hand experience with them. I'd recommend them to anyone who is tired of being taken advantage of by the two main incumbents with high prices and prehistoric monthly quotas.

Electronicbox is another good alternative, tho I have no experience with them.
 
I've got simillar problems with memory. I've created swap partition on master drive and it helped. Thanks a lot for your help.

Wysłane z mojego SM-G900F
 

Similar threads

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