3 added 112 characters in body
source | link

I'm using a Ubuntu 14.04.4 LTS on my server. Is there a way to zip everything on the server in a single archive, preferably with a single command?

I've tried using

zip -r backup.zip

but that doesn't work, since I'm not providing it with what I would like to zip. I have also tried using

zip -r backup.zip *.*

but that only zips the files, and not the directories.

I am aware that I could go with

zip -r var.zip var
zip -r root.zip root
zip -r media.zip media
etc

Since that would be time consuming, I'm looking for an easier solution, if it exists.

EDIT Use of 3rd party software, like Clonezilla, is not allowed. I have to find a command line solution.

I'm using a Ubuntu 14.04.4 LTS on my server. Is there a way to zip everything on the server in a single archive, preferably with a single command?

I've tried using

zip -r backup.zip

but that doesn't work, since I'm not providing it with what I would like to zip. I have also tried using

zip -r backup.zip *.*

but that only zips the files, and not the directories.

I am aware that I could go with

zip -r var.zip var
zip -r root.zip root
zip -r media.zip media
etc

Since that would be time consuming, I'm looking for an easier solution, if it exists.

I'm using a Ubuntu 14.04.4 LTS on my server. Is there a way to zip everything on the server in a single archive, preferably with a single command?

I've tried using

zip -r backup.zip

but that doesn't work, since I'm not providing it with what I would like to zip. I have also tried using

zip -r backup.zip *.*

but that only zips the files, and not the directories.

I am aware that I could go with

zip -r var.zip var
zip -r root.zip root
zip -r media.zip media
etc

Since that would be time consuming, I'm looking for an easier solution, if it exists.

EDIT Use of 3rd party software, like Clonezilla, is not allowed. I have to find a command line solution.

2 edited tags
| link
1
source | link

Zip the entire server from command line

I'm using a Ubuntu 14.04.4 LTS on my server. Is there a way to zip everything on the server in a single archive, preferably with a single command?

I've tried using

zip -r backup.zip

but that doesn't work, since I'm not providing it with what I would like to zip. I have also tried using

zip -r backup.zip *.*

but that only zips the files, and not the directories.

I am aware that I could go with

zip -r var.zip var
zip -r root.zip root
zip -r media.zip media
etc

Since that would be time consuming, I'm looking for an easier solution, if it exists.