Showing posts with label backup. Show all posts
Showing posts with label backup. Show all posts
Saturday, September 16, 2017
Ubuntu Tip Simple Backup Command Using CP
Ubuntu Tip Simple Backup Command Using CP
Backing up your computers hard drive is extremely important. Should the worst happen and you lose all of your important data, you need a way back. While there are many excellent utilities in the Ubuntu repositories that handle partial and full system backups. Sometimes a simpler solution is all that is needed.
Fortunately Ubuntu and Linux in general in fact comes with everything you need in the for of the very simple but also extremely powerful cp command. In case you havent figured it out yet, cp is Linux command line speak for copy. The examples below will show you how to use cp to back up your entire system.
sudo cp -r -u -x -v [source directory] [destination directory]
Example 1:
sudo cp -r -u -x -v /home/ /media/MY_USB_DRIVE
sudo: Gives temporary root privileges.
cp: Linux command line copy command.
-r: Used with cp this switch causes cp to copy directory content recursively. Meaning it will copy all files and subdirectories in the directory being copied.
-u: Used with cp this switch causes cp to only copy files that have changed or dont already exist at the destination.
-x: Used with cp this switch stops cp jumping to other file systems which it will do if it encounters hard links or symbolic links.
This switch also stops cp eating its tail if you choose to back up your entire system. See examples 2 and 3 below.
-v: Used with cp this switch cause cp to give feed back on whats happening.
Full System Backup With CP
If we wish to perform a full system backup then we might feel inclined to use a command similar to that in Example 2 below. The trouble is without the -x switch cp will also attempt to backup the backup to the backup. Basically eating its own tail in a never ending loop until all disk space is used up.
This happens because all other file systems are mounted to a location branching from the root file system. So if root is / then home is mounted to /home. Within Ubuntu all USB drives tend to be mounted to /media/a_USB_drive, etc.
However with the -x switch the command in example 2 will not be enough to back up the entire system if there are several storage devices or file systems mounted to different mount points. To get around this problem we must write a small script that will backup each file system separately. Example 3 shows a small example where the root files system / and /home are backed up separately.
Example 2:
sudo cp -r -u -v / /media/MY_USB_DRIVE
Example 3:
#!/bin/sh
#
# cp based backup script.
#
sudo cp -r -u -x -v / /media/MY_USB_DRIVE
sudo cp -r -u -x -v /home/ /media/MY_USB_DRIVE
This script can be created in any text editor like gedit or nano. After the script has been saved it must be given permission to be run as a program. Example 4 shows the command needed to change to the directory/folder where the script is stored. How to apply execute permissions and how to run the script.
Example 4:
First open a terminal window if you havent already done so and enter the following commands. The actual location of your script is where you chose to save it.
cd /home/aikiwolfie/scripts/ (press enter)
chmod a+x my_backup_script (press enter)
./my_backup_script (press enter)
And thats it. Sit back and watch the backup script do its job.
download file now
Monday, September 11, 2017
Ubuntu auto backup to remote host using scp rsync crontab
Ubuntu auto backup to remote host using scp rsync crontab
Bash script to transfer files via SCP
#!/bin/bashSave the above script to autoscp.sh and give the execute permission. The SourceFolder is the folder whose contents are sent to DestFolder on the remote host .
REMOTE_IP="x.x.x.x"
SCP_PASSWORD="mypassword"
expect -c "
set timeout 1
spawn scp -r /Local/SourceFolder uname@$REMOTE_IP:/Remote/DestFolder
expect yes/no { send yes ; exp_continue }
expect password: { send $SCP_PASSWORD }
expect 100%
sleep 1
exit
"
$ chmod +x file.shInstall expect if its not on our machine, expect is a program that "talks" to other interactive programs according to a script. We use this in this script to provide the password when asked for by the scp command.
$ ./file.sh
sudo apt-get install expect
Bash script to sync local & remote folder via rsync
#!/bin/bash-a preserves the date and times, and permissions of the files
REMOTE_IP="x.x.x.x"
SCP_PASSWORD="mypassword"
#And now transfer the file over
expect -c "
set timeout 1
spawn rsync -azvv -e ssh /Local/SrcFolder uname@$REMOTE_IP:/Remote/DstFolder
expect yes/no { send yes ; exp_continue }
expect password: { send $SCP_PASSWORD }
expect 100%
sleep 1
exit
"
-z compresses the data
-vv increases the verbosity of the reporting process
-e specifies remote shell to use
Save the above script to autorsync.sh file and give the execute permission.
Refer this Ubuntu documentation for more details on rsync. Both the bash scripts mainly automate the rsync and scp transfer, so that password dont need to be supplied.
Scheduling this rsync and scp scripts to run periodically
Use crontab to schedule these scripts to run periodically. To edit crontab usecrontab -eAdd the below lines
# m h dom mon dow commandm - minute
0 * * * * cd /location/of/script;./autoscp.sh
30 * * * * cd /location/of/script;./autorsync.sh
h - hour
dom - day of the month
mon - month
dow - day of the week
0 * * * * will run the script at 0 minutes every hour, every day of all the months.
30 * * * * will run the script at every 30 minutes on every hour, every day of all the months.
download file now
TUTORIAL BACKUP IMEI ANDROMAX R 4G LTE
TUTORIAL BACKUP IMEI ANDROMAX R 4G LTE
Tutorial Backup IMEI Andromax R � untuk melakukan sebuah root dan gunta ganti custom rom pasti memiliki banyak resiko dan salah satu resiko rooting gunta ganti rom dan sebagainya ialah kehilanag IMEI , nah pasti sudah pada taulah imei itu apa dan saya tidak perlu menjelaskan lebih jauh tentang imei , dan di sini saya akan kasih solusi cara backup IMEI andromax r , berikut tutorialnya .
Syarat Backup :
- Mempunyai Disk Space / Ruang Memeroi lebih dari 50MB
- Mempunya akses root
Bahan Bahan :
- Partitoan And Backup Apps Download Via Google Play
Tutorial :
1. Install Partition Backup & Restore dari Play Store
1. Install Partition Backup & Restore dari Play Store
2. Buka App nya dan Grant aja Root access nya.
3. Centang partisi = 1. Modem / mmcblk0p22
2. Modemst1 / mmcblk0p10
3. Modemst2 / mmcblk0p11
4. Diag / mmcblk0p15
4. Sentuh ikon download, kalau muncul �Please make sure you have�..� sentuh aja tulisan �BACKUP�
5. Proses backup berjalan�
6. Kalau backup selesai, hasil backupnya bisa dicari di Internal Storage dan di folder bernama PartitionBackup
NB : filenya dalam bentuk compressed, dan segera amankann
NB : Kata nya juga file MODEM itu gaada IMEI/MEID nya. tapi menurut ane itu file buat nangkep jaringan kalau di Windows nya itu MODEM itu buat software jalur antara Hardware penangkep sinyal dan MODEM itu software buat programming di hp nya biar sinyalnya bisa dipake. katanya juga di DIAG ada IMEI/MEID, lebih baik backup ke4 nya buat jaga-jaga. ntar doc selalu diupdate kalau dapat info baru
download file now
Friday, August 25, 2017
TUTORIAL Titanium Backup untuk restore game android
TUTORIAL Titanium Backup untuk restore game android
maksud dari judul di atas adalah menggunakan titanium backup sebagai loadtan untuk games. taro di mana,
Biasanya file TB itu di buat untuk bypass wifi jd game tidak minta data tambahan lagi melalui wifi,atau untuk meload games android jadi gini pemgertianya misalkan teman kamu maen games gangstar 3 di sudah berpetualang jauh menyelesaikan misi misi banyak dan sulit.nah jika anda ingin maen gangstar 3 dan tidak ingin dari awal anda bisa menyuruh teman anda melakukan backup dengan titanium backup ini dan filenya anda pindhakan ke hp anda jadi anda tinggal restore aja untuk penjelasanya lihat di bawah coba.
Pertama ekstrak dulu file TB yg di download ( isinya biasanya ada 2 atau 3 file )copykan ke dalam folder sd:/titaniumbackup

Kalau sudah buka aplikasi TB nya pilih backup/restore

Kemudian cari icon gamenya,klik lalu pilih restore

Then tinggal pilih mau restore yg mana....

kurang lebih begitu (dalam menggunakan titanium ini harap berhati2 karena kalo anda kurang hati2 anda bisa menghapus file bahkan system yang ada di android anda)
semoga bermanfaat
download file now
Subscribe to:
Posts (Atom)