Start a Conversation

Unsolved

T

3 Posts

1209

August 5th, 2020 16:00

Backing up your PowerEdge Server to an External USB Drive

I used the PC tool "Rufus" to format the external backup drive for GPT UEFI NTFS. From the tool, under boot selection, select UEFI:NTFS. Partion scheme is GPT, and Target System is UEFI. Also File System needs to be set to NTFS. Then mount the drive on linux using the following commands:

fdisk -l (to list all disks, my external drive showed up as sdbm1 but yours could be different)
mkdir /mnt/usbdrive (to make a directory for the usb drive to mount to)
mount /dev/sdbm1 /mnt/usbdrive (to mount the external drive [/dev/sdbm1] to the folder [/mnt/usbdrive])

the command line told me that windows had left some junk on the disk and it was cleaning it up, so I hit enter, then it mounted perfectly. I then used cd /mnt/usbdrive to change directories into the "usbdrive" folder where the external backup disk was mounted.

Now I could back up my linux system using the following commands:
rsync -arv /home /mnt/usbdrive/backup
rsync -arv /var /mnt/usbdrive/backup
rsync -arv /etc /mnt/usbdrive/backup

(alternatively, i could use rsync -Prv instead of -arv to show a progress bar instead of each file being copied) 

Some more directories to consider for a backup are:

  • /usr/local/ hand-installed packages (i.e. not installed through apt) are installed here. If you have packages installed here, you may want to backup the whole directory, so you don't have to reinstall them. If the packages themselves aren't important to you, it should be enough to backup /usr/local/etc/ and /usr/local/src/.
  • /opt/ if you didn't store anything here, you don't need to back it up. If you stored something here, you are in the best position to decide, if you want to back it up.
  • /srv/ much like /opt/, but is by convention more likely to contain data you actually want to backup.
  • /root/ stores configuration for the root user. If that is important to you, you should back it up.

And finally unmount the disk:
umount /dev/sdbm1

You can also set up automated backups using crontab, however I wouldn't recommend doing so with a hard disk drive (only an SSD is applicable for automated backups as it doesn't degrade the drive from remaining mounted and spinning during backups). There are guides that show you how to edit the crontab file to set a date and time to run specific commands, you would simply keep the external drive mounted and run the rsync backup commands from crontab. I hope this helps (especially the drive format types, this is where i got stuck)

No Responses!
No Events found!

Top