jborg / attic

Deduplicating backup program
Other
1.11k stars 104 forks source link

attic install fails on windows due to known issue with "os.uname"; fix included #188

Closed jumper444 closed 9 years ago

jumper444 commented 9 years ago

Attempt to install attic on windows xp machine (see command lines below) results in error due to use of "os.uname". (Environment: Windows XP sp3, fresh python 3.4.2.msi install from "python.org/downloads/windows)

Investigation finds that this is a known problem and that "os.uname" should not be used since it does not exist/function on Windows: http://bugs.python.org/issue8080

Instead this report says use "platform.uname". Can the Attic module be modified to use platform.uname thus allowing Windows installation? Is there something I'm missing otherwise or a workaround?


PIP INSTALL BELOW


C:\Python34>python -m pip install attic
Downloading/unpacking attic
  Running setup.py (path:t:\windows\pip_build_x\attic\setup.py) egg_info for pac
kage attic
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "t:\windows\pip_build_x\attic\setup.py", line 12, in <module>
        platform = os.uname()[0]
    AttributeError: 'module' object has no attribute 'uname'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "t:\windows\pip_build_x\attic\setup.py", line 12, in <module>

    platform = os.uname()[0]

AttributeError: 'module' object has no attribute 'uname'
jumper444 commented 9 years ago

https://github.com/unbit/uwsgi/issues/547 another article and comment (at bottom) saying: "...This particular problem is caused by the fact that os.uname() does not exist on Windows-built Pythons..."

jumper444 commented 9 years ago

I modified attic's 'setup.py' to add: "import platform" near top

and changed the os.uname line to: "platform = platform.uname()[0]"

Install now seems to proceed past the previous error and function properly. I suggest making this change to the code. (There are other errors relating to OpenSSL, but I will file a different issue ticket.)

jumper444 commented 9 years ago

Ok...well I think my ticket here is moot. I've noticed Attic isn't built or intended for Windows and that wasn't made clear from the original website pages. My tweaking of the 'uname' error was just the iceberg tip. The Setup.py file doesn't even recognize windows.

Then there is this dicussion: https://github.com/jborg/attic/pull/68

May I suggest the installation page SPECIFICALLY say this isn't written to work or tested on windows? https://attic-backup.org/installation.html#installation

Nothing mentions that directly and by appearances it's just a simple matter of installing some modules then..boom...off and running.

I blew unreasonable time on this today when "Not built to work on windows" under installation would have been a help. I know this is somewhat of a rant, but it is only a sentence and I'd have appreciated it instead of trying to troubleshoot installation code to find out I was wasting my time. Thanks.

rpodgorny commented 9 years ago

porting to new platform is never a waste of time. i'd like to see attic on windows as well.

anyway:

import platform
platform = something

is wrong as it overwrites the "platform" symbol. a different name should be used.

abaldwin99 commented 9 years ago

+1 to @jumper444. It would have been nice to have known windows was not supported. I guess I figured since it was python it would be platform independent. (Even though in retrospect I realize this was a bad assumption )

I don't mean to knock on this package. It looks like an awesome tool and I will likely use it in the future on one of my Linux boxes. However today I was looking for a windows based solution.

ThomasWaldmann commented 9 years ago

@blah73 if you want to try some experimental code, see https://github.com/attic/merge - branches "merge" and "merge-all" there. and try it on cygwin, it might work.

jumper444 commented 9 years ago

BLAH73...it DOES now work on windows (cygwin). It's a great program and in fact I was going to try and add windows instructions onto the project git page at some point in the future (if jborg lets me) to help out others (who aren't unix centric).

jumper444 commented 9 years ago

I dont have the time at the moment to find and post the information on how to do it on cygwin. If you just to the PIP INSTALL ATTIC the master branch will fail. Which was my point about how Thomas has a fix, but it isn't in the master branch yet and getting the patch branch to compile and work requires additional skills and software that a Cygwin person probably isn't familiar with. I think these issues will get smoothed over in the near future and I will try to assist.

jumper444 commented 9 years ago

Attic really is great functionally. The closest thing to what it does (and created from a consumer standpoint) is Crashplan.com which dedups and backups. Crashplan allows you to backup to local storage, USB, or other computers you own for free. The software only charges if you backup to crashplan cloud which is not necessary. If Attic isn't ready for you yet you might want to check this out. I have no relation to Crashplan but I found them at a similar time to finding Attic and am excited to see Attic working on Cygwin (windows).

jumper444 commented 9 years ago

Thomas, I see this merge repository you are referring to, but it is a new one - neither under jborg/attic or your named account. Is there a way to PIP INSTALL the attic/merge version?

ThomasWaldmann commented 9 years ago

No, i didn't make packages yet (but I plan to do soon, so it gets more testing).

jumper444 commented 9 years ago

Great. That is my point which is Cygwin people have less compile/make/etc experience yet that currently is required for them to use/test Attic - catch 22. If i have the time I can create documentation on how I got a patched version to compile/make under Cygwin, but clearly a better solution (yet more work for you) is a package.

jumper444 commented 9 years ago

There really is almost nothing like this on windows. Everything close either has a significant defect (like inability to delete old backups aka BUP) or is commercial (Crashplan).

evanhempel commented 9 years ago

pip install git+ssh://git@github.com/BlahCo/search/tree/prod_release_branch

Sent from Yahoo Mail on Android

From:"jumper444" notifications@github.com Date:Wed, Apr 15, 2015 at 12:33 pm Subject:Re: [attic] attic install fails on windows due to known issue with "os.uname"; fix included (#188)

Thomas, I see this merge repository you are referring to, but it is a new one - neither under jborg/attic or your named account. Is there a way to PIP INSTALL the attic/merge version?

— Reply to this email directly or view it on GitHub.

abaldwin99 commented 9 years ago

Thanks for the input. I have an immediate need to fill so I will be looking into crashplan but I am happy to test attic in a windows environment. The simple bash files are really appealing compared to the myriad of window's shareware + commercial GUIs.

level323 commented 9 years ago

I am a current Crashplan user (multiple paid home and business accounts, continually backing up about 15 machines for the past year or so). Just some comments (from experience) regarding Crashplan. In summary, initially reading through the specs and running it through it's paces everything looked awesome. Then, with continued use and trying to tweak it to my specific needs, the cracks start appearing. These cracks include:

There are also many great things about Crashplan (simple alerting system to report when backups aren't happening, simple "adoption" of backup sets, etc.), but these and other flaws/limitations are really causing me pain.

And all that said, if you're just a Joe Average home computer user with minimal IT skills who wants to back up his stuff on a handful of computers, then Crashplan is a decent option. For anything else, not so much.

Needless to say, I am in the process of planning to move over entirely to attic (both for my home computers and for the small business network I manage). Attic's functionality is already THAT good. Yes, there's no pointy-clicky UI but that will come, IMO, and in the meantime it's very easily operated for a nerd like me ;-) As I develop attic support tools/scripts to scratch my particular usage itches I hope to contribute them back in some way. Attic shows ENORMOUS potential.

ThomasWaldmann commented 9 years ago

os.uname issue fixed in PR #288.