Koozali.org formerly Contribs.org

Error with standard backup to USB

Offline CmdLn

Error with standard backup to USB
« on: March 07, 2017, 07:10:03 AM »
I have recently setup a standard dar backup to USB from the web interface. I chose all default settings and get this message in mail.

Partial backup stored on backup workstation.
Session cleanly closed by timeout after 28770 seconds.
Not an error, backup process will continue next night.
Received signal: Quit
Archive delayed termination engaged
Disabling signal handler, the next time this signal is received the program will abort immediately
Final memory cleanup...
Program has been aborted for the following reason: Thread cancellation requested, aborting as properly as possible
Error while running dar: 4 at /etc/e-smith/events/actions/workstation-backup-dar line 505.
Backup terminated: backup failed - status: 7424

I have check that there is disk space and there is about 50% available on the disk. I erased the disk before starting and data has been written to the disk. I tried to do a selective restore just to see if the backup was useable and got this message

Corrupted database :Error reading database /media/nolabel/sme.xxxxxx.co.za/dar-catalog : Cannot open file : No such file or directory

Offline TerryF

  • *
  • 1,047
Re: Error with standard backup to USB
« Reply #1 on: March 07, 2017, 08:45:51 AM »
What are the backup to workstation settings?

Will look like this:

Configure Workstation Backup
This panel displays the present workstation backup configuration. You can change it in this panel and the next one.
Backup is Enabled.
Backup is made on local removable disk media/SME Server
Number of rotating backup sets is 1
Number of daily backups contained in each set is 1
Compression level (0-9) of backup is 6
Daily backup occurs at 22:00
Each daily backup session is cleanly timed out after 8 hours.except full backups which are cleanly timed out after 24 hours
Full backup sessions (new backup set) are allowed everyday
Create or modify workstation backup configuration
Select the type of share for backup destination

and I presume this is a SME8 box
--
qui scribit bis legit

Offline CmdLn

Re: Error with standard backup to USB
« Reply #2 on: March 07, 2017, 08:52:58 AM »
I have disabled the timeout for full backups which was 8hrs. Hopefully this will sort out the problem.

Offline TerryF

  • *
  • 1,047
Re: Error with standard backup to USB
« Reply #3 on: March 07, 2017, 09:54:19 AM »
Following issued from the console..

Will show backup settings and
# db configuration show backupwk

Will run the scheduled backup
# /sbin/e-smith/do_backupwk

--
qui scribit bis legit

Offline CmdLn

Re: Error with standard backup to USB
« Reply #4 on: March 09, 2017, 12:44:19 PM »
The backup completes, but it takes 17hrs for just 300GB. I have done some testing with dd it see if USB is the issue, but the speed seems acceptable.

dd if=/root/test.out of=/media/usbdisk/test.out bs=64000 count=15625
15625+0 records in
15625+0 records out
1000000000 bytes (1.0 GB) copied, 22.663 seconds, 44.1 MB/s

Any ideas why its taking so long?

backupwk=service
    BackupTime=18:00
    Compression=1
    CompressionProg=gzip
    DaysInSet=1
    FullDay=7
    IncNum=0
    IncOnlyTimeout=yes
    Login=
    Password=
    Program=dar
    SetNum=1
    SetsMax=1
    SmbHost=localhost
    SmbShare=media/nolabel
    Timeout=23
    VFSType=usb
    status=enabled

Offline Stefano

  • *
  • 10,779
  • Skype account: maghissimo
    • Smeserver italian community
Re: Error with standard backup to USB
« Reply #5 on: March 09, 2017, 01:11:17 PM »
well, during backup you have gzip compression

I'd suggest you to install pigz (parallel gzip implementation, it will uses all the cores of your CPU), change the compressionprog key (pigz has the same CLI flags as gzip) and try again
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

Offline Stefano

  • *
  • 10,779
  • Skype account: maghissimo
    • Smeserver italian community
Re: Error with standard backup to USB
« Reply #6 on: March 09, 2017, 01:12:00 PM »
BTW, I have not tested it and don't know if it will work ;-)
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

Offline Stefano

  • *
  • 10,779
  • Skype account: maghissimo
    • Smeserver italian community
Re: Error with standard backup to USB
« Reply #7 on: March 09, 2017, 01:14:16 PM »
more info:
http://zlib.net/pigz/

to install it, you need to enable epel repo
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

Offline TerryF

  • *
  • 1,047
Re: Error with standard backup to USB
« Reply #8 on: March 09, 2017, 01:31:35 PM »
A full backup does take time depending on your system, but if you have configured incremental backups as well, they are much much faster and it is only on a full backup that time and size is an issue..
--
qui scribit bis legit

Offline CmdLn

Re: Error with standard backup to USB
« Reply #9 on: March 09, 2017, 02:08:32 PM »
The backup takes more than 8hrs with compression set to 0 (which I assume means no compression) and 6. Why do you think a full backup would take so long? by my calc 500GB @ 40MB/s would take about 4hrs?

I dont know if this is really a test, but I did dd if=/media/usbdisk/test.out of=/dev/null bs=64000 count=15625 to test the read speed on the root file system and I got 166MB/s.

Offline Stefano

  • *
  • 10,779
  • Skype account: maghissimo
    • Smeserver italian community
Re: Error with standard backup to USB
« Reply #10 on: March 09, 2017, 02:13:08 PM »
you can't consider such a test really significant..

during backup you read many (thousands) files and compress them (even without compression, you're making an archive)
so it's quite different..
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia

Offline Stefano

  • *
  • 10,779
  • Skype account: maghissimo
    • Smeserver italian community
Re: Error with standard backup to USB
« Reply #11 on: March 09, 2017, 02:23:39 PM »
forget about my pigz suggestion, it won't work, sorry
Consulente di Smeserver.it -  Soluzioni e supporto su Sme server in Italia