msanger / flyback

Automatically exported from code.google.com/p/flyback
0 stars 0 forks source link

IndexError: list index out of range #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello.

When I changed my flyback storage from NFS static mount to automount, I've
experienced just a little bit strange status.

>>What steps will reproduce the problem?

1. Change flyback external storage from NFS static mount to automount.
   Before, I wrote my storage like this.
   (/etc/fstab)----------------
   mysvr:/disk3/flyback   /mnt/flyback            nfs     tcp,soft,intr,bg
       3 3
   --------------------------------

   and flyback works fine.
   After that, I changed it from static mount to automount like this.

   (/etc/fstab)----------------
   #mysvr:/disk3/flyback   /mnt/flyback            nfs     tcp,soft,intr,bg
       3 3
   --------------------------------
   (/etc/auto.master)----------------
   /mnt/nfs        /etc/auto.nfs
   --------------------------------
   (/etc/auto.nfs)----------------
   flyback           -fstype=nfs,rw,tcp,bg,soft,intr mysvr:/disk3/flyback
   --------------------------------

   and I opened flyback GUI and changed external storage which my backup goes.

2. when cronjob start, backup works just one time. The end of backup, I
receive a error like this.
   (Error strings)-------------
Traceback (most recent call last):
  File "/home/kiuchi/flyback/flyback.py", line 721, in <module>
    main()
  File "/home/kiuchi/flyback/flyback.py", line 713, in main
    backup().backup()
  File "/home/kiuchi/flyback/backup_backend.py", line 242, in backup
    self.delete_old_backups_to_free_space()
  File "/home/kiuchi/flyback/backup_backend.py", line 352, in
delete_old_backups_to_free_space
    free_space = get_free_space(self.parent_backup_dir)
  File "/home/kiuchi/flyback/backup_backend.py", line 110, in get_free_space
    return int(stdout.readlines()[1].split()[3]) # in KB
IndexError: list index out of range
    ----------------------

    and lockfile.txt had not deleted. so, backup fails at next time without
I delete lockfile.txt by hand.

What version of the product are you using? On what operating system?
I uses flyback v0.4.0 on Fedora 8.

Please provide any additional information below.
Hmm......Is this information helps you?
------
$ rpm -qa|grep -i nfs
nfs-utils-1.1.0-6.fc8
nfs-utils-lib-1.1.0-4.fc8
$ uname -a
Linux localhost.localdomain 2.6.23.15-137.fc8 #1 SMP Sun Feb 10 17:48:34
EST 2008 i686 i686 i386 GNU/Linux

Thank you for read my broken english.
Any comment will helps me.

Original issue reported on code.google.com by mkiuc...@gmail.com on 4 Apr 2008 at 11:22

GoogleCodeExporter commented 9 years ago
After a little try, it seems work for me with changes below...

$ diff backup_backend.py backup_backend.py.org 
167,174c167,168
<     #stdin, stdout = os.popen4( 'df %s' % parent_backup_dir )
<     #return int(stdout.readlines()[1].split()[3]) # in KB
<     try:
<         stdin, stdout = os.popen4( 'df %s' % parent_backup_dir )
<         return int(stdout.readlines()[1].split()[3]) # in KB
<     except:
<         stdin, stdout = os.popen4( 'df %s' % parent_backup_dir )
<         return int(stdout.readlines()[2].split()[2]) # in KB
---
>     stdin, stdout = os.popen4( 'df %s' % parent_backup_dir )
>     return int(stdout.readlines()[1].split()[3]) # in KB

Original comment by mkiuc...@gmail.com on 5 Apr 2008 at 9:56

GoogleCodeExporter commented 9 years ago
Hi
I have implemented the suggested fix in issue 56 which sais that using df -P 
will
cause it not to wrap the lines after the device name.
http://code.google.com/p/warpback

Original comment by jarrod.c...@gmail.com on 1 Dec 2008 at 2:07

GoogleCodeExporter commented 9 years ago

Original comment by pub...@kered.org on 5 Dec 2008 at 7:02