Firefox 16, a treat for developers http://t.co/cnd27CzT
How to create backup with tarball -tar- command
TAR is usually used to create archive of entires directory and after the tar process we usually compress it in a GZIP file, tar is considered as the easiest and simplest way to make a backup for files and folders in Linux.
1-How to create tar backup :
- Create a tar in zip format with the file named as todays date/time, as root (or use sudo before the command for ubuntu and debian):
tar czvf my_backup.$(date +%Y%m%d-%H%M%S).tgz /home/pirat9/Download
as you see i used czvf ,this mean :
“c” stands for create, “z” make tar archive in a GZIP compressed file,“v” verbose option , “f“filename (the name of our tarball)
- You can also create the backup using tar with a script like :
A simple shell script for the above:
#!/bin/bash
tar czvf $1.$(date +%Y%m%d-%H%M%S).tgz $1
exit $?
Save the script as ‘back’, use chmod to make it executable and then run it passing a single file or foldername:
chmod 700 backup
Now to create backup for the folder download type :
./back Download
check if the backup has been created successefely.
[pirat9@localhost ~]$ ll
total 271212
drwxr-xr-x. 2 pirat9 pirat9 4096 2009-06-18 08:53 Desktop
drwxr-xr-x. 2 pirat9 pirat9 4096 2009-06-17 10:27 Documents
drwxr-xr-x. 23 pirat9 pirat9 12288 2009-06-18 08:57 Download
drwxrwxr-x. 19 pirat9 pirat9 12288 2009-06-12 08:28 hplip-3.9.4b
-rwxrwxr-x. 1 pirat9 pirat9 15721700 2009-06-12 07:19 hplip-3.9.4b.run
drwxr-xr-x. 2 pirat9 pirat9 4096 2009-06-11 01:23 Music
-rw-rw-r--. 1 pirat9 pirat9 261935395 2009-06-22 08:30 my_backup.20090622-083025.tgz
drwxr-xr-x. 2 pirat9 pirat9 4096 2009-06-11 01:23 Pictures
drwxr-xr-x. 2 pirat9 pirat9 4096 2009-06-11 01:23 Public
drwxr-xr-x. 2 pirat9 pirat9 4096 2009-06-11 01:23 Templates
drwxr-xr-x. 2 pirat9 pirat9 4096 2009-06-11 01:23 Videos
Important: Always keep your backup in another drive or in usb
2. How To Restore A Backup TAR file
To restore your backup, use the command :
tar-zxvf my_backup.20090622-083025.tgz
As you see above i used instead of c the “x” option means stands for extract.
(1) we will see later how to create a full system backup using the tarball command
-
http://voku-online.de
-
-
Like us on Facebook
This week Top Posts 
Top Things to do After Installing Ubuntu 13.04 ‘Raring Ringtail’ : Ubuntu 13.04 Raring Ringtail final is almost out. The final release it scheduled for release on Apri...0 comment(s) |
Howto: Upgrade to Ubuntu 13.04 Raring Ringtail from 12.04, 12,10 | Desktop & Server : Updated 05-04-2013: Ubuntu 13.04 Raring Ringtail will be released Soon, If you have ubuntu 12,10, 12...0 comment(s) |
Install lamp with 1 command in Ubuntu 12.10, 13.04 Raring Ringtail & LinuxMint13 : Updated: 10/09/2012 :LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform ...0 comment(s) |
Unix/Linux File Recognition. Did You Know? : Did you know that Unix and Linux has no concept of a file extension? What is a file name extension?
...0 comment(s) |
Configure conky-Lua in Ubuntu (12.10 & 13.04 Raring Ringtail), Fedora, debian and LinuxMint | Howto Conky : Updated 05-04-2013: Conky is a free, light-weight system monitor for X, that displays any informatio...0 comment(s) |
Howto- Resolve nosound problem on Ubuntu 13.04 Raring Ringtail,12.10 and Older : Updated 05/04/2013 : One of the common issues facing Ubuntu users after installing or upgrading Ubun...1 comment(s) |
Recent Posts
- Unix/Linux File Recognition. Did You Know?
- Migrate from MySQL to MariaDB in FreeBSD
- Connect Your Android Galaxy Tablet to Ubuntu via USB
- ElementaryOS Beta 1 and 2 Comparison and Review
- Introduction to the Linux Command Line
- A Secure Password
- Linux Kernel 3.10. It’s BIG!
- Monitoring Users Activity Using psacct or acct Tools in Linux
- Run Your Own Social Network Using elgg on RHEL / CentOS and Scientific Linux
- Getting Debian 7.0 ‘Wheezy’ Up and Running
Recent Comments



















Brandon Hawkins
| #
thanks
Nova
| #
I wonder if there is a way to create your own themes.
Red Adaya
| #
Thank you! This worked for me!!!
SK
| #
Andrew look into your httpd.conf file at line no 350. There might be a syntax error.
andrew
| #
hello I have this error
[root@cloud html]# /etc/init.d/httpd restart
then this appears
Starting httpd: httpd: Syntax error on line 350 of /etc/httpd/conf/httpd.conf: without matching section.
plz tell how to fix this.