Tutorial by Examples: backup

Create a snapshot of a whole database: mysqldump [options] db_name > filename.sql Create a snapshot of multiple databases: mysqldump [options] --databases db_name1 db_name2 ... > filename.sql mysqldump [options] --all-databases > filename.sql Create a snapshot of one or more tables...
mysql [options] db_name < filename.sql Note that: db_name needs to be an existing database; your authenticated user has sufficient privileges to execute all the commands inside your filename.sql; The file extension .sql is fully a matter of style. Any extension would work. You cannot spe...
psql < backup.sql A safer alternative uses -1 to wrap the restore in a transaction. The -f specifies the filename rather than using shell redirection. psql -1f backup.sql Custom format files must be restored using pg_restore with the -d option to specify the database: pg_restore -d DATABA...
You can use the adb backup command to backup your device. adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|nosystem] [<packages...>] -f <filename> specify filename default: creates backup.ab in the current directory -apk|noapk...
$ cp .vimrc{,.bak} This expands into the command cp .vimrc .vimrc.bak.
If you wish to make a complete backup of a large MySql installation and do not have sufficient local storage, you can dump and compress it directly to an Amazon S3 bucket. It's also a good practice to do this without having the DB password as part of the command: mysqldump -u root -p --host=localho...
Exec sp_configure 'backup compression default',1 GO RECONFIGURE;
To get the list of all backup operations performed on the current database instance: SELECT sdb.Name AS DatabaseName, COALESCE(CONVERT(VARCHAR(50), bus.backup_finish_date, 120),'-') AS LastBackUpDateTime FROM sys.sysdatabases sdb LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_nam...
By default stored procedures and functions or not generated by mysqldump, you will need to add the parameter --routines (or -R): mysqldump -u username -p -R db_name > dump.sql When using --routines the creation and change time stamps are not maintained, instead you should dump and reload the ...
The following command backs up the 'Users' database to 'D:\DB_Backup' file. Its better to not give an extension. BACKUP DATABASE Users TO DISK = 'D:\DB_Backup'
There are many ways to backup an Alfresco system. It is important that you backup the database as well as the content store. You may also want to back up the Solr indices. Assuming you installed using the binary installer, and everything lives in $ALRESCO_HOME, you can backup the database like this...
sed -i -e cmd file will modify file even if its permissions are set to read-only. This command behaves similarly to sed -e cmd file > tmp; mv -f tmp file rather than sed -e cmd file > tmp; cat tmp > file; rm tmp The following example uses gnu sed: $ echo 'Extremely important data' &gt...
The backup menu is in the Administration Panel. And in the Left menu, inside the Server Administration, go on Backup. TeamCity (as of v10) does not automatically backup, but you can get TeamCity to back itself up on a daily basis by scheduling a task to hit the REST api. Typically you would also n...
public static Boolean ExportDB(String DATABASE_NAME , String packageName , String folderName){ //DATABASE_NAME including ".db" at the end like "mayApp.db" String DBName = DATABASE_NAME.substring(0, DATABASE_NAME.length() - 3); File data = Environment.getDataDir...
We need to create a container to mount the volume. Then archive it and download the archive to our host. Let's create first a data volume with some data: docker volume create --name=data echo "Hello World" | docker run -i --rm=true -v data:/data ubuntu:trusty tee /data/hello.txt Let...
First of all, Ensure that the user which will be running this call has the Change backup settings and control backup process privilege. # # TC Backup Launcher # Script to launch a backup on the TeamCity Server # Param( [Parameter(Mandatory=$true)][string]$username, [Parameter(Mandato...
COPY products TO 'D:\csv_backup\products_db.csv' DELIMITER ',' CSV HEADER; COPY categories TO 'D:\csv_backup\categories_db.csv' DELIMITER ',' CSV HEADER;
Web deployment offers the option to automatically backup target Web site (not target Web application!) on deployment. This is recommended to allow web application rollback. In order to configure automatic backups, the following steps must be followed: 1) Enable backups Open %programfiles%\IIS\Mic...
On the machine where you'd like to make the backup, jump to the Redis CLI: redis-cli Password? If your master Redis DB (the one you want to replicate) has a password: config set masterauth <password> Start replication Run the following to begin replication: SLAVEOF <host> <...
If we want our app data to be protected against iTunes backups, we have to skip our app data from being backed up in iTunes. Whenever iOS device backed up using iTunes on macOS, all the data stored by all the apps is copied in that backup and stored on backing computer. But we can exclude our app ...

Page 1 of 1