• Home
  • Subscribe
  • Contribute Us
    • Share Your Interview Experience
  • Contact Us
  • About
    • About CSEstack
    • Campus Ambassador
  • Forum & Discus
  • Tools for Geek
  • LeaderBoard
CSEstack

What do you want to Learn Today?

  • Programming
    • Tutorial- C/C++
    • Tutorial- Django
    • Tutorial- Git
    • Tutorial- HTML & CSS
    • Tutorial- Java
    • Tutorial- MySQL
    • Tutorial- Python
    • Competitive Coding Challenges
  • CSE Subject
    • (CD) Compiler Design
    • (CN) Computer Network
    • (COA) Computer Organization & Architecture
    • (DBMS) Database Management System
    • (DS) Data Structure
    • (OS) Operating System
    • (ToA) Theory of Automata
    • (WT) Web Technology
  • Interview Questions
    • Interview Questions- Company Wise
    • Interview Questions- Coding Round
    • Interview Questions- Python
    • Interview Questions- REST API
    • Interview Questions- Web Scraping
    • Interview Questions- HR Round
    • Aptitude Preparation Guide
  • GATE 2022
  • Linux
  • Trend
    • Full Stack Development
    • Artificial Intelligence (AI)
    • BigData
    • Cloud Computing
    • Machine Learning (ML)
  • Write for Us
    • Submit Article
    • Submit Source Code or Program
    • Share Your Interview Experience
  • Tools
    • IDE
    • CV Builder
    • Other Tools …
  • Jobs

How to Download Files from Pythonanywhere for Backup?

Aniruddha Chaudhari/1374/0
Django

PythonAnywhere is one of the most popular Django hosting server platforms where you can host and run your Django website.

In an earlier tutorial, I have explained to you how to host and run your Django website on PythonAnywhere. In this tutorial, I am going to explain to you the steps to take the Django website backup.

We all know how crucial it is to take the backup regularly. Taking backup regularly can be very useful to restore your website in case any mishap happens.

You can take the backup of your Django project manually. By doing it manually, you don’t need to pay anything extra (Completely FREE).

Steps to Take Backup on PythonAnywhere Manually

These steps include simple commands. Let’s follow them one by one.

Step 1. Create a Backup (Zip)

  • Login to your PythonAnywhere account in the web browser and open the dashboard.
  • Open PythonAnywhere bash console.
  • By default, the current directory in bash will be your project directory. Go to the parent directory (go up by one).
(project_name.pythonanywhere.com) 17:28 ~ $ cd ../ 

(project_name.pythonanywhere.com) 17:28 ~ $ pwd 
/home/account

(project_name.pythonanywhere.com) 17:28 ~ $ ls 
README.txt  project_name.pythonanywhere.com  static 

(project_name.pythonanywhere.com) 17:28 ~ $ 

These are just basic Linux commands.

  • Here your project directory is project_name.pythonanywhere.com. Create the zip bundle using below command.
$ zip -r backup_file_name project_name.pythonanywhere.com

It will take some time to create the zip bundle based on your project directory size. Once it is done, you can download the bundle.

Step 2. How to download Backup files from PythonAnywhere?

  1. Go to the Files.
  2. You will see the backup zip file. Click on the download button icon.
PythonAnywhere-download django backup

It will start downloading the backup file on your local system.

Step 3. Unzip and check the backup

Once you download files from pythonanywhere, you have to verify them.

You can unzip or extract the downloaded zip bundle to see all the backup files. Make sure it has all your project files including the database file. Keep this zip file for future use.

With some sort of Python scripting, you can also automate these steps for backing up the project and database files.

I hope you find these steps to take a backup on PythonAnywhere manually simple and easy. If you find any difficulties taking backup, let me know in the comment below.

Python Interview Questions eBook

DjangoPythonAnywhere
Aniruddha Chaudhari
I am complete Python Nut, love Linux and vim as an editor. I hold a Master of Computer Science from NIT Trichy. I dabble in C/C++, Java too. I keep sharing my coding knowledge and my own experience on CSEstack.org portal.

Your name can also be listed here. Got a tip? Submit it here to become an CSEstack author.

Leave a Reply Cancel reply

Prerequisite for Django

Learn Python Basics

Django Tutorials

Why Django?

Django- Create Your First Project

Django- Adding CSS/Static Files

Django- Use/Load Static Files

Django- Create Form

Django- Create Input-Tags

Django- Display Message on Form Submit

Django- MultipleChoiceField in Form

Django- Read Model Data (order_by)

Django- Read First/Last Queryset Object

Django- Update Model Field

Django- Signals

Django- Create TextField in Form

Django- Add Model to Admin Site

Django- Customize Admin Site

Django- Understanding Model User

Django- Registration/Signup Form

Django- Form Layout with Widget-Tweaks

Django- OneToOneField in Model

Django- Foreign Key & Reverse Lookup

Django- Custom Template Filters

Django- Interactive Shell

Django- Social Login

Django- Deploy and Host [FREE] 🔥

© 2022 – CSEstack.org. All Rights Reserved.

  • Home
  • Subscribe
  • Contribute Us
    • Share Your Interview Experience
  • Contact Us
  • About
    • About CSEstack
    • Campus Ambassador
  • Forum & Discus
  • Tools for Geek
  • LeaderBoard