Archiving and backup from Linux server
![](/media/n/82964/c66e9182e52743bc80eab53a9f064ccf/d2faf0ed-8e67-4898-85ff-e3e28f7486d5.webp)
Archiving and backup from Linux server
Solution
Archive Command : tar -cvf mybackup.tar source destination
Extract Command : tar -xvf mybackup.tar source destination
Archive and Zip Command : tar -zcvf mybackup.tar source destination
Solution
Command rsync : for backup from local system to other systems
rsync source destination
Solution
Copy data from one hard drive to another
dd if=/dev/sda of=/dev/sdb
Solution
VPS Backup (CDP Script)
Solution
Backup in graphical environment
apt install timeshift
Commands
sudo timeshift –list
sudo timeshift –check
sudo timeshift –create
sudo timeshift –restore
sudo timeshift --restore --snapshot '[snapshot]'
sudo timeshift --delete --snapshot '[snapshot]'
--tags D Daily Backup
--tags W Weekly Backup
--tags M Monthly Backup
--tags O On-demand Backup
Third-party applications for backup
sudo apt install brasero
Install CDP client on Linux and verify that the CDP CLI client is working
To avoid conflicts with older versions of Python or other packages, Cloudera recommends that you install the CDP client in a virtual environment. Use the virtualenv tool to create a virtual environment and install the client.
Use pip to install the client on a virtual environment:
mkdir ~/cdpclienv
virtualenv ~/cdpclienv
source ~/cdpclienv/bin/activate
~/cdpclienv/bin/pip install cdpcli
To upgrade the CDP client to the latest version, run the following command
~/cdpclienv/bin/pip install --upgrade cdpcli
After the client installation process is complete, run the following command to confirm that the CDP client is working
If virtualenv is activated: cdp --version
If virtualenv is not activated: ~/cdpclienv/bin/cdp --version
Mostafa jahanpur