https://github.com/chmodshubham/backup-2-pendrive
How to take backup in your Pen Drive!
https://github.com/chmodshubham/backup-2-pendrive
backup pendrive
Last synced: 24 days ago
JSON representation
How to take backup in your Pen Drive!
- Host: GitHub
- URL: https://github.com/chmodshubham/backup-2-pendrive
- Owner: chmodshubham
- Created: 2023-07-20T06:19:50.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-20T06:43:01.000Z (over 2 years ago)
- Last Synced: 2025-10-09T01:55:13.188Z (5 months ago)
- Topics: backup, pendrive
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Backup to Pen Drive
To send data from your server to a pen drive using the terminal, you can follow these steps:
#### 1. Plug in your pen drive
#### 2. Identify the pen drive
Use the `lsblk` or `fdisk` command to identify your pen drive. The output will show a list of storage devices along with their mount points. Your pen drive will typically be listed as `/dev/sdb1`, `/dev/sdc1`, etc. depending on the number of storage devices connected to your server.
```bash
lsblk
```
or
```bash
sudo fdisk -l
```
#### 3. Mount the pen drive
If your pen drive is not automatically mounted, you will need to manually mount it. First, create a mount point. This is a directory where your pen drive will be mounted:
```bash
sudo mkdir /mnt/usb
```
Then, mount the pen drive to the directory you just created. Replace `/dev/sdb1` with the path that corresponds to your pen drive:
```bash
sudo mount /dev/sdb1 /mnt/usb
```
#### 4. Transfer the data
Now you can transfer data from your server to the pen drive. Use the `cp` command to copy files or directories. Replace `/path/to/your/data` with the path to the data you want to copy:
```bash
sudo cp /path/to/your/data /mnt/usb
```
#### 5. Check the data
You can check if the data has been successfully copied:
```bash
ls /mnt/usb
```
#### 6. Safely remove the pen drive
Before physically removing the pen drive, it's important to unmount it safely to prevent data corruption:
```bash
sudo umount /mnt/usb
```
Now, you can safely remove the pen drive from your server.