![]() These can be important in the event of a compliance issue, where forensic analysis is required. If you want to go the extra mile, server configuration files and logs. It is very important that you backup your entire application, including database dumps, core files, plugins, and media files. ![]() Just a note for the -p flag of the mkdir command this flag indicates that there will be no errors if the directories already exist and will also create parent directories as needed. Inside this folder, we have created four more directories: db, core, logs, and conf. This command will create the “backup” directory in /home/username/. In Linux and macOS you can create a directory using the mkdir command, like this: mkdir -p /home/username/backup/ Here you can see that the root directory for this website is /home/ma658tvk. If you don’t know what your website’s root directory is, you can find this information in your cPanel account: We will remove backups from the server once they are transferred to your computer. If the root directory of your web application is /home/username/html you can create your “backup” folder in /home/username/ without a problem. You can locate this folder anywhere as long as it’s not publicly available. Now, we’re going to create a new folder on your server named “ backup”. Open your terminal and type the following command to connect to your server using the SSH protocol: ssh you are connected to the server in terminal, every command you type will be executed on your server. SSH stands for Secure Shell, and it’s commonly used to perform remote command execution. Once you connect your computer and your server, you can use commands to quickly backup your website. What your database is: MySQL, PostgreSQL or SQLite (if your website uses one).Your website’s root directory (and any directory you want to include/exclude from your backup).Terminal (such as gnome-terminal – used to run all commands).SSH (used to create/delete backup files).Your host should be able to assist you with confirming that you have the required software and credentials. This post is not intended to provide a complete solution for backups, but instead, for someone who has the time and wants to learn a few basic command-line tools that can be used to create backups. If you’re not on Linux/Mac, we have step-by-step guide on how to create website backups using software with a graphical interface that works on Windows. Creating website backups should be one of the most important recurring tasks for a website administrator, and yet backups are often forgotten when thinking about website security.Ĭreating backups using command-line tools are available to all Linux/Mac users for free.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |