Hi,
Here are steps to use fabric in Python 3.
workaround to get Fabric working with Python3
1. Create a python2.x virtualenv
1
mkvirtualenv --python=/usr/bin/python2 fab-env
2. Install Fabric
1
pip install fabric
3. Create another python3 virtualenv
1
mkvirtualenv --python=/usr/bin/python3 django18_py3
4. Make sure to work on the python3 virtualenv
1
workon django18_py3
5. Then run Fabric using the absolute path of Fabric in a directory of
your choice
1
/root/.virtualenvs/fab-env/bin/fab -f /home/code/APPNAME/fabfile.py
FAB_COMMAND
Thanks,
sathish . A
On Tuesday, 24 November 2015 14:05:20 UTC+5:30, sathish anton wrote:
>
> Hi,
> Thank You for your inputs.
> I had Messed with my local files as i was trying to add some new apps.
> So i required to backup my production M/c src and contents.
>
> I managed to replicate by following below steps
> This is what i did to replicate manually.
>
> 1. pip freeze >production_requiremnts.txt(Production M/c)
> 2. virtualenv <projname> (local M/c)
> 3. cd <projdir/projname> (local M/c)
> 4. source bin/actiate (local M/c Activate virtual env)
> 5. pip install -U -r production_requirements.txt(local m/c)
> 6. mezzanine-project -a cartridge <projname> (local M/c)
> 7. pg_dump -Fc dbname > db.dump (Production M/c)
> 8. createdb newdb (Local M/c)
> 9. pg_restore -d newdb db.dump(local M/c)
> 10. Updated local_settings.py with newdb
> 11. Python manage.py runserver (Able to login with username created in
> production env)
> 12. rsync <production proj dir> <local proj dir> (to update my apps,
> media and static files)
> 13. Updated my settings.py to reflect the static, media ,new database and
> apps.
> 14. Ran python manage.py runserver to see identical pages and data.
>
> Please let me know if i am missing any further steps required such as
>
> 1. python manage.py dumpdata(prod m/c)
> 2. python manage.py loaddata(llocal M/c)
> Are the above required.
>
> Thanks.
> Sathish A
>
>
>
>
> On Monday, 23 November 2015 17:49:20 UTC+5:30, Kenneth Bolton wrote:
>>
>> What have you tried?
>>
>> Mezzanine ships with backup and restore functions for the database in the
>> Fabric script. Your VCS-of-choice handles your static files. Uploaded media
>> content is not a "one size fits all" problem, and is left as an exercise
>> for the developer. I modify the fabfile.py file that ships with Mezzanine
>> for the specific requirements of each project. Automated timed backups can
>> be done with cron or celery.
>>
>> hth.
>>
>> -ken
>>
>> On Mon, Nov 23, 2015 at 7:00 AM, sathish anton <[email protected]>
>> wrote:
>>
>>> Hi,
>>> Please provide steps to backup all stuff including content, media,
>>> database and everything replicated in a secondary server at regular
>>> intervals.
>>> Hence the same site can be replicated in the event of a crash.
>>>
>>> Thanks.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Mezzanine Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.