...yeah;  lots of hardwired paths...

On Fri, Oct 2, 2009 at 2:26 AM, Web2py-SuperFan <mwkan...@gmail.com> wrote:

>
> thanks for the advice.  much appreciated.
>
> I hacked out a script borrowing from Massimo's fine fileutils.py
>
> i copied that file and added this to the top of it:
>
> from datetime import date
>
> and this to the end and  i call it and it does what i need, sure is
> ugly though, only a parent could love:
>
> def marksuntar():
> # change the next line to the file you want to unzip to see you got it
> all so you can get a warm and fuzzy
>        tar = tarfile.open('c:/backup/backup3.tar')
>        tar.extractall(path='c:/backup/', )
>        tar.close()
>
>
> def markstar():
>        expression='^.+$'
>        dir = 'C:/Users/mark/Documents/_web2py9_28/src/web2py_src/web2pyc/
> applications/'
>        try:
>                os.makedirs('c:/backup/', 0777)
>        except EnvironmentError:
>                pass
>        d = str(date.today())
>
>        tar = tarfile.open('c:/backup/backup' + d +'.tar', "w")
>
>
>        for file in listdir(dir, add_dirs=True):
>                tar.add(os.path.join(dir, file), file, False)
>        tar.add('C:\\Users\\mark\\Documents\\_web2py9_28\\src\\web2py_src\
> \web2pyc\\app.yaml')
>        tar.add('C:\\Users\\mark\\Documents\\_web2py9_28\\src\\web2py_src\
> \web2pyc\\routes.py')
>        tar.close()
>
> markstar()
>
>
> On Oct 1, 3:04 pm, Yarko Tymciurak <yark...@gmail.com> wrote:
> > I can see you prefer rsync.
> >
> > You should use what you are comfortable with and what works for you.
> >
> > I also see the multiple benefits to limiting when rsyn is used, so I
> > won't agree with you, but I won't argue against your choice.
> >
> > On 10/1/09, Julio <ju...@techfuel.net> wrote:
> >
> >
> >
> >
> >
> > > Claiming one is better than the other is in the eye of the beholder
> > > don't you think? - I think the point here is *what* exactly does
> > > SuperFan needs, from the title of the post I can see he's looking for
> > > a "backup" option, but does he refer to a pure backup solution or a
> > > source control solution?, I am sorry but for single backups I don't
> > > think rsync can be beaten, a single liner for a command that is
> > > already included in your box (hence my original question about what OS
> > > was he using) would be mostly effective.. Cheers.
> >
> > > On Oct 1, 11:33 am, Yarko Tymciurak <yark...@gmail.com> wrote:
> > >> mercurial (or git) is a better option than rsync for many reasons (and
> > >> both are really efficient) than rsync.  Rsync is more general -
> > >> executables are available for PCs (I used it a lot in corp world;)
> >
> > >> On 10/1/09, Julio <ju...@techfuel.net> wrote:
> >
> > >> > [3] Is exactly the reason why I was asking :)
> >
> > >> > I don't know if rsync exists in the windows world, and if it does,
> I'd
> > >> > suggest using it, for backup purposes, IMO can't be beaten, rsync
> will
> > >> > (optionally) update only what was changed in the code so the
> bandwith
> > >> > used (if you copy say, from server to server) is minimal and the
> time
> > >> > of a backup could be done pretty quickly..
> >
> > >> > hth
> >
> > >> > Julio
> >
> > >> > On Oct 1, 9:23 am, Yarko Tymciurak <yark...@gmail.com> wrote:
> > >> >> Argh!
> >
> > >> >> [1] - just learn / get used to using a version control system
> locally
> > >> >> (e.g.
> > >> >> mercurial, bazaar, git);
> > >> >> [2] - learn to make backups with that version control system (e.g.
> how
> > >> >> Massimo pushes his changes out to launchpad, for example, you can
> do
> > >> >> the
> > >> >> same to push to another repository - on another disk, on another
> > >> >> machine)
> >
> > >> >> [3] - in a pinch, learn to use rsync (with exclude lists, and -avup
> > >> >> flags,
> > >> >> for example)
> > >> >> [4] - if you really, really want to use "old fashioned"
> distribution
> > >> >> methods, go ahead and tar up your directory.
> >
> > >> >> On Thu, Oct 1, 2009 at 11:13 AM, Julio <ju...@techfuel.net> wrote:
> >
> > >> >> > What OS plattform you using?
> >
> > >> >> > On Oct 1, 8:16 am, Web2py-SuperFan <mwkan...@gmail.com> wrote:
> > >> >> > > Hi,
> >
> > >> >> > > I was wondering if there is a backup source code method built
> in to
> > >> >> > > web2py or if someone has built a py script to backup all
> > >> >> > > applications
> > >> >> > > including the routes.py and app.yaml file to a timestamped tar
> or
> > >> >> > > zipped folder.  If so would you mind posting the script?
> >
> > >> >> > > Basically I want to back up my work daily including all the
> code in
> > >> >> > > the applications folder by running a script daily.
> >
> > >> >> > > something like:
> >
> > >> >> > > target_folder = c:\backup\todaysdate
> > >> >> > > copy applications to target folder
> > >> >> > > copy app.yaml to target_folder
> > >> >> > > copy routes.py to target_folder
> > >> >> > > zip (or tar) target_folder
> >
> > >> >> > > Thanks
> > >> >> > > Mark- Hide quoted text -
> >
> > - Show quoted text -
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to